亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? porting-from-imlib.sgml

?? This GTK+ version 2.12.3. GTK+ is a multi-platform toolkit for creating graphical user interfaces.
?? SGML
字號:
  <appendix>    <title>Porting applications from &Imlib; to &gdk-pixbuf;</title>    <para>      This appendix contains the basic steps needed to port an      application that uses the &Imlib; library to use &gdk-pixbuf;      instead.    </para>    <note>      <para>	This appendix refers to version 1 of the &Imlib; library; this	discussion is not relevant to Imlib 2.  Also, we discuss the	gdk_imlib API instead of the Xlib-based API.      </para>    </note>    <!-- Introduction -->    <sect1>      <title>Introduction</title>      <para>	Prior to the GNOME 1.2 platform, the &Imlib; library was the	preferred way of loading and rendering images in GNOME	applications.  Unfortunately, &Imlib; has important design	limitations that make it hard to write efficient and highly	modular applications.      </para>      <para>	The &gdk-pixbuf; library was designed as a solution to	&Imlib;'s shortcomings.  It provides a simple, orthogonal API	and convenience functions for the most common operations.  In	addition, it supports full transparency information for	images, or alpha channel.  More importantly, it has	well-defined semantics for memory management through the use	of reference counting; &Imlib; has an intractably complex	memory management mechanism and cache that will make your head	spin.      </para>    </sect1>    <!-- Differences between Imlib and gdk-pixbuf -->    <sect1>      <title>Differences between &Imlib; and &gdk-pixbuf;</title>      <para>	Generally, applications that use &Imlib; do not have to be	changed extensively to use &gdk-pixbuf;; its simple and	flexible API makes things easy.  This section describes the	differences between &Imlib; and &gdk-pixbuf;; you should take	these into account when modifying your applications to use	&gdk-pixbuf;.      </para>      <!-- Initialization -->      <sect2>	<title>Initialization</title>	<para>	  The &gdk-pixbuf; library does not need to be initialized.	</para>	<note>	  <para>	    In GNOME applications you normally don't need to	    initialize &Imlib;, as <function>gnome_init()</function>	    calls <function>gdk_imlib_init()</function> automatically.	  </para>	</note>      </sect2>      <!-- Memory management -->      <sect2>	<title>Memory management</title>	<para>	  The &gdk-pixbuf; library provides a simple, well-defined	  memory management mechanism for images in the form of	  reference counting.  This makes it very convenient to use	  for large-scale applications that need to share images	  between different parts of the program.  In stark contrast,	  &Imlib; has a terribly complex mechanism of an image and	  pixmap cache which makes it very hard for applications to	  share image structures between different parts of the	  program.  Unfortunately this mechanism makes things very	  prone to memory leaks and tricky bugs.	</para>	<para>	  The basic principle in &gdk-pixbuf; is that when you obtain	  a new <link linkend="GdkPixbuf">GdkPixbuf</link> structure,	  it is created with an initial reference count of 1.  When	  another part of the program wants to keep a reference to the	  pixbuf, it should call <function>g_object_ref()</function>;	  this will increase the reference count by 1.  When some part	  of the program does not need to keep a reference to a pixbuf	  anymore and wants to release the pixbuf, it should call	  <function>g_object_unref()</function>; this will decrease	  the reference count by 1.  When the reference count drops to	  zero, the pixbuf gets destroyed or	  <emphasis>finalized</emphasis> and its memory is freed.	</para>	<para>	  For applications that need to implement a cache of loaded	  images, &gdk-pixbuf; provides a way to hook to the last	  unreference operation of a pixbuf; instead of finalizing the	  pixbuf, the user-installed hook can decide to keep it around	  in a cache instead.	</para>	<para>	  Finally, &gdk-pixbuf; does not provide a cache of rendered	  pixmaps.  This is unnecessary for most applications, since	  the scaling and rendering functions are quite fast and	  applications may need to use subtly different values each	  time they call these functions, for example, to take into	  account dithering and zooming offsets.	</para>	<para>	  Most applications will simply need to call	  <function>g_object_ref()</function> when they want to keep	  an extra reference to a pixbuf, and then	  <function>g_object_unref()</function> when they are done	  with it.	</para>      </sect2>      <!-- The Rendering Process -->      <sect2>	<title>The Rendering Process</title>	<para>	  The &gdk-pixbuf; library has the policy of always rendering	  pixbufs to GDK drawables you provide; it will not create	  them for you.  This is in general more flexible than	  &Imlib;'s policy of always creating a pixmap and making you	  use that instead.	</para>	<para>	  The disadvantage of always having a pixmap created for you	  is that it wastes memory in the X server if you intend to	  copy that rendered data onto another drawable, for example,	  the final destination window or a temporary pixmap for	  drawing.  This is the most common case, unfortunately, so	  the &Imlib; policy introduces unnecessary copying.	</para>	<para>	  Also, &Imlib; can only render pixmaps that are the whole	  size of the source image; you cannot render just a subset	  region of the image.  This is inconvenient for applications	  that need to render small portions at a time, such as	  applications that do scrolling.  Since the whole image must	  be rendered at a time, this can lead to performance and	  memory usage problems.	</para>	<para>	  The &gdk-pixbuf; library lets you render any rectangular	  region from an image onto any drawable that you provide.	  This lets the application have fine control the way images	  are rendered.	</para>      </sect2>    </sect1>    <!-- Converting Applications to gdk-pixbuf -->    <sect1>      <title>Converting Applications to &gdk-pixbuf;</title>      <para>	This sections describes the actual changes you need to make in	an &Imlib; program to make it use &gdk-pixbuf; instead.      </para>      <!-- Image loading and creation -->      <sect2>	<title>Image loading and creation</title>	<para>	  The &gdk-pixbuf; library can load image files synchronously	  (i.e. with a single function call), create images from RGB	  data in memory, and as a convenience, it can also create	  images from inline XPM data.	</para>	<para>	  To load an image file in a single function call, simply use	  <function>gdk_pixbuf_new_from_file()</function>.  Note that	  this will make the program block until the whole file has	  been read.  This function effectively replaces	  <function>gdk_imlib_load_image()</function>.	</para>	<para>	  If you have RGB data in memory, you can use	  <function>gdk_pixbuf_new_from_data()</function> to create a	  pixbuf out of it; this is a replacement for	  <function>gdk_imlib_create_image_from_data()</function>.	  &gdk-pixbuf; does not copy the image data; it is up to you	  to define the ownership policy by providing a destroy	  notification function that will be called when the image	  data needs to be freed.  The function you provide can then	  free the data or do something else, as appropriate.	</para>	<para>	  As a convenience, you can use the	  <function>gdk_pixbuf_new_from_xpm_data()</function> function	  to create a pixbuf out of inline XPM data that was compiled	  into your C program.  This is a replacement for	  <function>gdk_imlib_create_image_from_xpm_data()</function>.	</para>	<para>	  After you have created a pixbuf, you can manipulate it in	  any way you please and then finally call	  <function>g_object_unref()</function> when you are done	  with it.  This can be thought of as a replacement for	  <function>gdk_imlib_destroy_image()</function> but with much	  cleaner semantics.	</para>      </sect2>      <!-- Rendering Images -->      <sect2>	<title>Rendering Images</title>	<para>	  Applications that use &Imlib; must first call	  <function>gdk_imlib_render()</function> to render the whole	  image data onto a pixmap that &Imlib; creates.  Then they	  must copy that pixmap's data into the final destination for	  the image.	</para>	<para>	  In contrast, &gdk-pixbuf; provides convenience functions to	  render arbitrary rectangular regions of an image onto a	  drawable that your application provides.  You can use	  <function>gdk_draw_pixbuf()</function> to do this; having          your application provide the destination drawable and	  specify an arbitrary region means your application has          complete control over the way images are rendered.	</para>	<para>	  As a convenience, &gdk-pixbuf; also provides the	  <function>gdk_pixbuf_render_pixmap_and_mask()</function>	  function; this will create new pixmap and mask drawables for	  a whole pixbuf and render the image data onto them.  Only	  trivially simple applications should find a use for this	  function, since usually you want finer control of how things	  are rendered.	</para>      </sect2>      <!-- Scaling Images -->      <sect2>	<title>Scaling Images</title>	<para>	  &Imlib; lets you render scaled image data at the time you	  call <function>gdk_imlib_render()</function>.  Again, this	  unfortunately scales and renders the whole image onto a new	  pixmap.	</para>	<para>	  &gdk-pixbuf; provides a number of functions that do scaling	  of arbitrary regions of a source pixbuf onto a destination	  one.  These functions can also perform compositing	  operations against the data in the destination pixbuf or	  against a solid color or a colored checkerboard.	  <footnote>	    <para>	      You can use a colored checkerboard as the background for	      compositing when you want to provide a visual indication	      that the image has partially opaque areas.  This is	      normally used in image editing and viewing programs.	    </para>	    <para>	      Compositing against a single solid color is actually a	      special case of a checkerboard; it simply uses checks of	      the same color.	    </para>	  </footnote>	</para>	<para>	  Very simple applications may find it sufficient to use	  <function>gdk_pixbuf_scale_simple()</function> or	  <function>gdk_pixbuf_composite_color_simple()</function>.	  These functions scale the whole source image at a time and	  create a new pixbuf with the result.	</para>	<para>	  More sophisticated applications will need to use	  <function>gdk_pixbuf_scale()</function>,	  <function>gdk_pixbuf_composite()</function>, or	  <function>gdk_pixbuf_composite_color()</function> instead.	  These functions let you scale and composite an arbitrary	  region of the source pixbuf onto a destination pixbuf that	  you provide.	</para>      </sect2>      <!-- Getting Image Data from a Drawable -->      <sect2>	<title>Getting Image Data from a Drawable</title>	<para>	  &Imlib; lets you create an image by fetching a drawable's	  contents from the X server and converting those into RGB	  data.  This is done with the	  <function>gdk_imlib_create_image_from_drawable()</function>	  function.	</para>	<para>	  &gdk-pixbuf; provides the	  <function>gdk_pixbuf_get_from_drawable()</function> function	  instead.  It lets you specify a destination pixbuf instead	  of always creating a new one for you.	</para>      </sect2>    </sect1>  </appendix><!--Local variables:mode: sgmlsgml-parent-document: ("gdk-pixbuf.sgml" "book" "book" "")End:-->

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
婷婷开心久久网| 九九热在线视频观看这里只有精品| 久久免费国产精品| 91精品国产91久久久久久最新毛片 | 337p亚洲精品色噜噜狠狠| 色哟哟在线观看一区二区三区| 国产激情精品久久久第一区二区| 精品一区中文字幕| 久久电影国产免费久久电影| 日韩av电影天堂| 日本视频免费一区| 美女视频第一区二区三区免费观看网站| 香蕉成人啪国产精品视频综合网| 亚洲主播在线观看| 亚洲曰韩产成在线| 亚洲一区二区视频在线| 亚洲福利视频一区二区| 肉肉av福利一精品导航| 日韩精品成人一区二区三区| 日本一不卡视频| 美女视频黄免费的久久| 国产精品69毛片高清亚洲| 国产一区二三区好的| 国产综合成人久久大片91| 国产成人鲁色资源国产91色综| 国产高清精品在线| 成人黄色免费短视频| 色综合久久66| 欧美二区三区91| 日本成人在线电影网| 日本在线不卡视频| 久久精品国产99国产精品| 国产精品1024| 91蜜桃在线观看| 欧美丰满少妇xxxxx高潮对白| 精品久久人人做人人爰| 国产精品视频一二三| 一区二区三区在线视频播放| 天堂成人国产精品一区| 激情五月婷婷综合网| 99精品视频中文字幕| 欧美日韩在线直播| 欧美tickling挠脚心丨vk| 国产精品你懂的在线| 亚洲国产视频网站| 国产一区二区在线影院| 91丨porny丨最新| 欧美一区二区三区视频| 亚洲国产精品高清| 亚洲bt欧美bt精品| 福利一区二区在线观看| 欧美视频一区二区三区四区| 久久众筹精品私拍模特| 亚洲影院免费观看| 韩国av一区二区三区| 日本道在线观看一区二区| 视频一区视频二区中文| 国产成人在线影院| 欧美精品久久久久久久多人混战| 国产三级精品视频| 亚洲bt欧美bt精品| 成人av网站在线| 欧美一级欧美三级| 亚洲欧美区自拍先锋| 精品一区二区综合| 欧美在线视频不卡| 国产日韩高清在线| 日本特黄久久久高潮| 色综合久久九月婷婷色综合| 精品电影一区二区| 亚洲国产日韩一级| 99麻豆久久久国产精品免费| 精品国产三级a在线观看| 亚洲综合一二区| 成人午夜激情在线| 欧美成人女星排行榜| 一区二区三区不卡视频在线观看| 国产高清亚洲一区| 日韩一区二区三区高清免费看看| 亚洲三级视频在线观看| 国产成人午夜精品5599| 日韩视频一区在线观看| 亚洲一区二区高清| 91丨porny丨国产入口| 国产午夜精品美女毛片视频| 日本va欧美va精品| 精品视频一区三区九区| 亚洲夂夂婷婷色拍ww47| 99re成人精品视频| 国产精品乱码妇女bbbb| 国产精品主播直播| 日韩欧美一级精品久久| 日韩一区精品视频| 欧美午夜寂寞影院| 亚洲美女视频一区| 97久久精品人人澡人人爽| 欧美国产欧美综合| 国产精品中文欧美| 久久网站最新地址| 国产在线国偷精品产拍免费yy| 欧美一区二区啪啪| 午夜精品免费在线| 欧美日韩在线免费视频| 夜夜亚洲天天久久| 日本高清不卡视频| 一区二区欧美国产| 在线观看精品一区| 伊人一区二区三区| 欧美伊人久久大香线蕉综合69 | 国产视频在线观看一区二区三区| 麻豆精品在线播放| 欧美成人综合网站| 久久国产免费看| 精品蜜桃在线看| 激情伊人五月天久久综合| 国产亚洲视频系列| 国产福利一区在线观看| 国产精品欧美一级免费| 9l国产精品久久久久麻豆| 亚洲男同性恋视频| 欧美性视频一区二区三区| 亚洲va在线va天堂| 欧美丰满美乳xxx高潮www| 久久aⅴ国产欧美74aaa| 久久在线观看免费| 成人黄色大片在线观看| 综合色中文字幕| 在线观看视频欧美| 日韩经典中文字幕一区| 久久这里只精品最新地址| 成人深夜福利app| 亚洲人快播电影网| 欧美日韩黄色影视| 麻豆国产欧美日韩综合精品二区| 久久亚洲私人国产精品va媚药| 国产成人在线免费| 亚洲精品你懂的| 91精品国产一区二区三区蜜臀 | 国产不卡在线播放| 亚洲欧洲中文日韩久久av乱码| 欧美熟乱第一页| 精品在线你懂的| 国产精品国产三级国产普通话三级 | 中文字幕一区二区三区在线观看| 9色porny自拍视频一区二区| 午夜av一区二区| 精品久久久久99| 99精品热视频| 日本aⅴ亚洲精品中文乱码| 国产欧美在线观看一区| 在线看日本不卡| 久久99国产精品久久| 亚洲欧洲成人精品av97| 91麻豆精品国产自产在线观看一区| 国内精品视频一区二区三区八戒| 国产精品成人一区二区三区夜夜夜| 欧美日韩视频在线第一区 | 日本一道高清亚洲日美韩| 欧美国产一区在线| 欧美日韩不卡一区二区| 国产精品1024| 日本在线不卡一区| 亚洲婷婷综合色高清在线| 日韩网站在线看片你懂的| 99免费精品视频| 韩国三级中文字幕hd久久精品| 亚洲精品一二三| 久久综合丝袜日本网| 欧美探花视频资源| 国产成人高清视频| 天天操天天色综合| 亚洲天堂网中文字| 欧美精品一区二区三| 欧美日韩精品三区| 成人激情免费视频| 久久99国产精品尤物| 午夜视频一区二区三区| 国产精品传媒入口麻豆| 精品国产一区二区三区av性色| 欧美视频一区二| 波多野结衣中文一区| 麻豆国产一区二区| 五月天中文字幕一区二区| 亚洲欧洲制服丝袜| 久久先锋影音av| 欧美挠脚心视频网站| 色婷婷亚洲综合| 高清视频一区二区| 黄色日韩网站视频| 日本强好片久久久久久aaa| 亚洲一区二区黄色| 亚洲你懂的在线视频| 亚洲欧洲99久久| 国产视频亚洲色图| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 亚洲成人av中文| 日韩毛片高清在线播放| 国产精品视频第一区| 国产日韩欧美精品在线| 精品国产凹凸成av人网站|