PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

Image related php-gtk functions | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

Images are displayed using the GtkPixmap widget which has to be invoked with two parameters; a map of type GdkPixmap and a mask of type GdkBitmap. The map defines all the pixels with its colors, and as the map is not able to contain transparent color information, the mask is a map of 1's and 0's telling which pixel is transparent and which not.

There are two functions dedicated to reading of XPM images:

As both functions are identical in usage, I will describe pixmap_create_from_xpm_d only.
list( $pixmap, $mask) = gdk::pixmap_create_from_xpm_d( $objWindow->window, $colTransparent, $arImage);
The function returns an array of size 2: the first is the map with all the pixels and colors, and the second is the mask with transparency information. We store them in two different variables here, although you can just use an array.

The first parameter, $objWindow->window is the GdkWindow of your application's window. Please make sure that the GdkWindow exists by showing the GtkWindow or by calling the realize() function.

The second parameter, $colTransparent defines which color the transparent color (color None) will get if the pixmask is not used when creating e.g. the GtkPixmap.

The third parameter is the name of the image file (pixmap_create_from_xpm), or a normal php array with the structure as described in the XPM standard (pixmap_create_from_xpm_d).

忘却曲線を使ってこの関数を確実に記憶に残す

フォーラムで「Image related php-gtk functions」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | Image related php-gtk functions」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: