diff options
author | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-16 18:49:26 +0900 |
---|---|---|
committer | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-30 00:39:06 +0900 |
commit | fcbf63e62c627deae76c1b8cb8c0876c536ed811 (patch) | |
tree | 64cb17de3f41a2b6fef2368028fbd00349946994 /jni/ruby/ext/tk/lib/tkextlib/tkimg |
Fresh start
Diffstat (limited to 'jni/ruby/ext/tk/lib/tkextlib/tkimg')
20 files changed, 639 insertions, 0 deletions
diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/README b/jni/ruby/ext/tk/lib/tkextlib/tkimg/README new file mode 100644 index 0000000..f5981cb --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/README @@ -0,0 +1,26 @@ + + [ Tcl/Tk Image formats (TkImg) support ] + +TkImg contains a collection of format handlers for the Tk photo +image type, and a new image type, pixmaps. + +Supported formats of TkImg version 1.3 are +------------------------------------------------------- + bmp : Windows Bitmap Format + gif : Graphics Interchange Format + ico : Windows Icon Format + jpeg : Joint Picture Expert Group format + pcx : Paintbrush Format + pixmap : Pixmap Image type + png : Portable Network Graphics format + ppm : Portable Pixmap format + ps : Adobe PostScript Format + sgi : SGI Native Format + sun : Sun Raster Format + tga : Truevision Targa Format + tiff : Tagged Image File Format + window : Tk Windows + xbm : X Window Bitmap Format + xpm : X Window Pixmap Format +------------------------------------------------------- + diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/bmp.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/bmp.rb new file mode 100644 index 0000000..ea90181 --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/bmp.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'bmp' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +#TkPackage.require('img::bmp', '1.3') +TkPackage.require('img::bmp') + +module Tk + module Img + module BMP + PACKAGE_NAME = 'img::bmp'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::bmp') + rescue + '' + end + end + end + end +end diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/dted.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/dted.rb new file mode 100644 index 0000000..cae8336 --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/dted.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'DTED' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::dted', '1.4') +TkPackage.require('img::dted') + +module Tk + module Img + module DTED + PACKAGE_NAME = 'img::dted'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::dted') + rescue + '' + end + end + end + end +end diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/gif.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/gif.rb new file mode 100644 index 0000000..d542d47 --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/gif.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'gif' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::gif', '1.3') +TkPackage.require('img::gif') + +module Tk + module Img + module GIF + PACKAGE_NAME = 'img::gif'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::gif') + rescue + '' + end + end + end + end +end diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/ico.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/ico.rb new file mode 100644 index 0000000..e79bdf4 --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/ico.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'ico' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::ico', '1.3') +TkPackage.require('img::ico') + +module Tk + module Img + module ICO + PACKAGE_NAME = 'img::ico'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::ico') + rescue + '' + end + end + end + end +end diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/jpeg.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/jpeg.rb new file mode 100644 index 0000000..2126120 --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/jpeg.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'jpeg' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::jpeg', '1.3') +TkPackage.require('img::jpeg') + +module Tk + module Img + module JPEG + PACKAGE_NAME = 'img::jpeg'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::jpeg') + rescue + '' + end + end + end + end +end diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/pcx.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/pcx.rb new file mode 100644 index 0000000..6831f4d --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/pcx.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'pcx' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)# + +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::pcx', '1.3') +TkPackage.require('img::pcx') + +module Tk + module Img + module PCX + PACKAGE_NAME = 'img::pcx'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::pcx') + rescue + '' + end + end + end + end +end diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/pixmap.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/pixmap.rb new file mode 100644 index 0000000..bd1b870 --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/pixmap.rb @@ -0,0 +1,44 @@ +# +# TkImg - format 'pixmap' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::pixmap', '1.3') +TkPackage.require('img::pixmap') + +module Tk + module Img + module PIXMAP + PACKAGE_NAME = 'img::pixmap'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::pixmap') + rescue + '' + end + end + end + end +end + +class TkPixmapImage<TkImage + def self.version + Tk::Img::PIXMAP.version + end + + def initialize(*args) + @type = 'pixmap' + super(*args) + end +end diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/png.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/png.rb new file mode 100644 index 0000000..5c829f4 --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/png.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'png' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::png', '1.3') +TkPackage.require('img::png') + +module Tk + module Img + module PNG + PACKAGE_NAME = 'img::png'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::png') + rescue + '' + end + end + end + end +end diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/ppm.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/ppm.rb new file mode 100644 index 0000000..eacfae4 --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/ppm.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'ppm' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::ppm', '1.3') +TkPackage.require('img::ppm') + +module Tk + module Img + module PPM + PACKAGE_NAME = 'img::ppm'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::ppm') + rescue + '' + end + end + end + end +end diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/ps.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/ps.rb new file mode 100644 index 0000000..68e9178 --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/ps.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'ps' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::ps', '1.3') +TkPackage.require('img::ps') + +module Tk + module Img + module PS + PACKAGE_NAME = 'img::ps'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::ps') + rescue + '' + end + end + end + end +end diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/raw.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/raw.rb new file mode 100644 index 0000000..5f1cdca --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/raw.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'Raw Data' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::raw', '1.4') +TkPackage.require('img::raw') + +module Tk + module Img + module Raw + PACKAGE_NAME = 'img::raw'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::raw') + rescue + '' + end + end + end + end +end diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/setup.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/setup.rb new file mode 100644 index 0000000..ee406c6 --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/setup.rb @@ -0,0 +1,8 @@ +# +# setup.rb -- setup script before calling TkPackage.require() +# +# If you need some setup operations (for example, add a library path +# to the library search path) before using Tcl/Tk library packages +# wrapped by Ruby scripts in this directory, please write the setup +# operations in this file. +# diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/sgi.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/sgi.rb new file mode 100644 index 0000000..ec7038b --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/sgi.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'sgi' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::sgi', '1.3') +TkPackage.require('img::sgi') + +module Tk + module Img + module SGI + PACKAGE_NAME = 'img::sgi'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::sgi') + rescue + '' + end + end + end + end +end diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/sun.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/sun.rb new file mode 100644 index 0000000..651f946 --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/sun.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'sun' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::sun', '1.3') +TkPackage.require('img::sun') + +module Tk + module Img + module SUN + PACKAGE_NAME = 'img::sun'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::sun') + rescue + '' + end + end + end + end +end diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/tga.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/tga.rb new file mode 100644 index 0000000..1eae407 --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/tga.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'tga' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::tga', '1.3') +TkPackage.require('img::tga') + +module Tk + module Img + module TGA + PACKAGE_NAME = 'img::tga'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::tga') + rescue + '' + end + end + end + end +end diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/tiff.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/tiff.rb new file mode 100644 index 0000000..ed271c2 --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/tiff.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'tiff' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::tiff', '1.3') +TkPackage.require('img::tiff') + +module Tk + module Img + module TIFF + PACKAGE_NAME = 'img::tiff'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::tiff') + rescue + '' + end + end + end + end +end diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/window.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/window.rb new file mode 100644 index 0000000..3b5906f --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/window.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'window' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::window', '1.3') +TkPackage.require('img::window') + +module Tk + module Img + module WINDOW + PACKAGE_NAME = 'img::window'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::window') + rescue + '' + end + end + end + end +end diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/xbm.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/xbm.rb new file mode 100644 index 0000000..f4bea03 --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/xbm.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'xbm' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::xbm', '1.3') +TkPackage.require('img::xbm') + +module Tk + module Img + module XBM + PACKAGE_NAME = 'img::xbm'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::xbm') + rescue + '' + end + end + end + end +end diff --git a/jni/ruby/ext/tk/lib/tkextlib/tkimg/xpm.rb b/jni/ruby/ext/tk/lib/tkextlib/tkimg/xpm.rb new file mode 100644 index 0000000..5119c87 --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tkimg/xpm.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'xpm' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::xpm', '1.3') +TkPackage.require('img::xpm') + +module Tk + module Img + module XPM + PACKAGE_NAME = 'img::xpm'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::xpm') + rescue + '' + end + end + end + end +end |