Gimp
Gimp
メインのモジュール
Included modules:
Constants:
Gimp::MAJOR_VERSION
- -
Gimp::MINOR_VERSION
- -
Gimp::MICRO_VERSION
- -
Gimp::VERSION
- -
Gimp::LOCALEDIR
- -
Gimp::ENABLE_NLS
- -
Gimp::MIN_IMAGE_SIZE
- pixel sizes
Gimp::MAX_IMAGE_SIZE
- pixel sizes
Gimp::MIN_RESOLUTION
- dots per inch
Gimp::MAX_RESOLUTION
- dots per inch
Gimp::CHECK_SIZE
- the size of the checks which indicate transparency...
Gimp::CHECK_SIZE_SM
- the size of the checks which indicate transparency...
Gimp::CHECK_DARK
- -
Gimp::CHECK_LIGHT
- -
Singlton Methods:
Gimp.major_version
- Gimpのメジャーバージョン
Gimp.minor_version
- Gimpのマイナーバージョン
Gimp.micro_version
- Gimpのマイクロバージョン
Gimp.directory
-
Returns the user-specific GIMP settings directory. If the environment variable GIMP_DIRECTORY exists, it is used. If it is an absolute path, it is used as is. If it is a relative path, it is taken to be a subdirectory of the home directory. If it is relative path, and no home directory can be determined, it is taken to be a subdirectory of Gimp::data_directory().
The usual case is that no GIMP_DIRECTORY environment variable exists, and then we use the GIMPDIR subdirectory of the home directory. If no home directory exists, we use a per-user subdirectory of Gimp::data_directory(). In any case, we always return some non-empty string, whether it corresponds to an existing directory or not.
Returns: The user-specific GIMP settings directory.
Gimp.personal_rc_file(basename)
-
basename: The basename of a rc_file.
Returns: The name of a file in the user-specific GIMP settings directory.
Gimp.data_directory
-
Returns the top directory for GIMP data. If the environment variable GIMP_DATADIR exists, that is used. It should be an absolute pathname. Otherwise, on Unix the compile-time defined directory is used. On Win32, the installation directory as deduced from the executable's name is used.
Returns: The top directory for GIMP data.
Gimp.sysconf_directory
-
Returns the top directory for GIMP config files. If the environment variable GIMP_SYSCONFDIR exists, that is used. It should be an absolute pathname. Otherwise, on Unix the compile-time defined directory is used. On Win32, the installation directory as deduced from the executable's name is used.
Returns: The top directory for GIMP config files.
GIMP側のバグのため、現在のWin32版では使用できません。
Gimp.gtkrc
- Returns the name of the GIMP's application-specific gtkrc file.
Gimp.default_display
- Returns the default Gimp::Display (given at plug-in config time).
Gimp.gamma
- γ値
Gimp.install_cmap
- 独自のカラーマップをインストールするか?
Gimp.use_xshm
- Xのシェアードメモリ拡張を止揚するか?
Gimp.color_cube
- -
Gimp.min_colors
- -
Gimp.progname
- -
Module Functions:
Procedual DataBase に登録されている関数をモジュール関数として呼び出すことが 出来ます。その際にエラーは例外で通知されます。
Gimp.main
- The main procedure. 内部でruby_finalize()とexit()を呼び出しているので、 このメソッドからは制御が帰って来ません。
Gimp.install_procedure(name, blurb, help, author, copyright, date, menu_path, image_types, type, nparams, nreturn_vals, params, return_vals)
- Install a procedure in the procedure database.
Gimp.install_temp_proc(name, blurb, help, author, copyright, date, menu_path, image_types, type, nparams, nreturn_vals, params, return_vals, proc)
- Install a temporary procedure in the procedure database.
Gimp.uninstall_temp_proc
- Uninstall a temporary procedure
Gimp.gettext
- -
Gimp.INIT_LOCALE
- -
Gimp.CHECK_VERSION(major, minor, micro)
- GIMPのバージョンが指定したバージョン以上か。
Gimp.strescape(source, exception = nil)
-
source: A string to escape special characters in. exceptions: A string holding characters not to be escaped.
Escapes special characters in a string in the same way as in the C language, i.e. either with one of the sequences \b, \f, \n, \r, \t, \\, \", or as a three-digit octal escape sequence \nnn.
If the list of exceptions is NULL, all ASCII control characters, the backslash character, the double-quote character, and all non-ASCII characters are escaped.
If glib > 1.3 is installed this function is identical to g_strescape(). For systems using glib-1.2 this function provides the added functionality from glib-1.3.
Gimp.strecompress(source)
-
source: A string to that has special characters escaped.
Does the opposite of g_strescape(), that is it converts escaped characters back to their unescaped form.
Escaped characters are either one of the sequences \b, \f, \n, \r, \t, \\, \", or a three-digit octal escape sequence \nnn.
If glib > 1.3 is installed this function is identical to g_strcompress(). For systems using glib-1.2 this function provides the functionality from glib-1.3.
Gimp.extension_ack
- Send an extension initialization acknowledgement
Gimp.extension_process
- -
Gimp.register(name, blurb, help, author, copyright, date, menupath, imagetypes = "", params = [], results = [])
-
Ruby-Fuの機能です。 nameで指し示される名前のトップレベルの関数(Objectクラスのメソッド)を 登録する。
paramsとresultsの要素は[type, name, description, default [, extra]]という 形の配列です。また、extraを与える場合はextraも配列です。
typeの値は、以下のいずれかです。
- RF_ADJUSTMENT
-
実数。extraは[value, lower, upper, step_increment, page_increment, page_size, is_spin = false]です。
例:
register("ruby_fu_raindrop_logo_alpha", "Creates a logo like a raindrop", "Creates a logo like a raindrop", "Iccii <iccii@hotmail.com>", "Copyright 2001, Iccii", "Feb, 2001", "<Image>/Ruby-Fu/Alpha to Logo/Rain drop...", "RGBA", [ [RF_IMAGE, "image", "Image"], [RF_DRAWABLE, "drawable", "Drawable"], [RF_COLOR, "text_color", "Text Color", Color(0, 63, 255)], [RF_COLOR, "bg_color", "Background Color", Color(0, 127, 255)], [RF_ADJUSTMENT, "light", "Lighting (degrees)", 45, [0, 360, 1, 10, 0, 0]], [RF_ADJUSTMENT, "blur", "Blur Radius", 10, [1, 63, 1, 5, 0, 0]], [RF_ADJUSTMENT, "hilight_width", "Highlight Width (%)", 30, [0, 100, 1, 5, 0, 0]], [RF_ADJUSTMENT, "hilight_offset", "Highlight Offset", 3, [0, 50, 1, 5, 0, 1]], [RF_ADJUSTMENT, "shadow_offset", "Shadow Offset", 5, [0, 50, 1, 5, 0, 1]], [RF_TOGGLE, "antialias", "Antialias", true] ])
- RF_STRING
-
文字列。extraには複数行かどうかのフラグが入ります。 デフォルトはfalse
例:
register("ruby_fu_eval", "Evaluate ruby code", "Evaluate ruby code", "Masahiro Sakai", "Copyright (c) 2001 Masahiro Sakai", "Feb 2001", "<Toolbox>/Xtns/Ruby-Fu/eval...", "", [[RF_STRING, "code", "Code to eval", "", [true]]], [], method(:eval))
- RF_COLOR
- RGBの色
- RF_REGION
- 矩形領域
- RF_TOGGLE
- 真偽値
- RF_IMAGE
- イメージ
- RF_DRAWABLE
- ドローワブル
- RF_LAYER
- レイヤ
- RF_CHANNEL
- チャンネル
- RF_OPTION
- 列挙型(後述)
- RF_FONT
- フォント名
- RF_FILENAME
- ファイルネーム
- RF_BRUSH
- ブラシ名
- RF_PATTERN
- パターン名
- RF_GRADIENT
- グラデーション名
- RF_UNIT
- 単位。extraはGimp::UI::UnitMenuのnewの引数です。(省略可能) extra = [format, unit, show_pixels, show_percent, show_custom]
Gimp.register(name, blurb, help, author, copyright, date, menupath, imagetypes = "", params = [], results = [])
- Ruby-Fuの機能。nameという名前の関数を登録します。
Gimp.register(name, blurb, help, author, copyright, date, menupath, imagetypes = "", params = [], results = [], callable)
- Ruby-Fuの機能。callableを登録します。 callableは通常はMethod?かProc?ですが、 callメソッドが適切に定義された任意のオブジェクトを指定できます。
Gimp.register(name, blurb, help, author, copyright, date, menupath, imagetypes = "", params = [], results = []){|*args|... }
- Ruby-Fuの機能。はブロックを登録します。
Keyword(s):
References:[Gimp-Ruby::Reference Manual]