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

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

?? z186.html

?? gtk_text program sample&eg
?? HTML
?? 第 1 頁 / 共 3 頁
字號:
          To understand <tt class="FUNCTION">          gnome_canvas_render_svp()</tt>, or to do your own RGB          buffer drawing (without using <tt class="APPLICATION">          libart_lgpl</tt>), you will need to know what a <span          class="STRUCTNAME">GnomeCanvasBuf</span> is:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;typedef struct {  guchar *buf;  int buf_rowstride;  ArtIRect rect;  guint32 bg_color;  unsigned int is_bg : 1;  unsigned int is_buf : 1;} GnomeCanvasBuf;      </pre>            </td>          </tr>        </table>        <p>          The <span class="STRUCTNAME">buf</span> member is an RGB          buffer, as explained in <a href="z132.html#SEC-GDKRGB">          the section called <i>RGB Buffers</i> in the chapter          called <i>GDK Basics</i></a>. The <span class=          "STRUCTNAME">buf_rowstride</span> is the buffer's          rowstride, also explained in <a href=          "z132.html#SEC-GDKRGB">the section called <i>RGB          Buffers</i> in the chapter called <i>GDK Basics</i></a>.          An <span class="STRUCTNAME">ArtIRect</span> is an integer          rectangle; <span class="STRUCTNAME">rect</span> defines          the redraw region in canvas pixel coordinates that this          buffer represents. <span class="STRUCTNAME">          rect.x0</span> and <span class="STRUCTNAME">          rect.y0</span> are the buffer offsets and correspond to          row 0, column 0 in the RGB buffer; you can convert from          canvas pixel coordinates to RGB buffer coordinates by          subtracting these values.        </p>        <p>          As an optimization, the canvas does not initialize the          RGB buffer with the background color, because the first          canvas item might cover the entire background anyway.          Thus, if your canvas item is the first one to render, you          must put some pixel value in every pixel of the redraw          region defined by the buffer's <span class="STRUCTNAME">          rect</span>. If your item does not cover a pixel, you          should fill that pixel with the <span class="STRUCTNAME">          bg_color</span>; <span class="STRUCTNAME">bg_color</span>          is a packed RGB value (no alpha). If you do this          manually, unpack an RGB value <span class="STRUCTNAME">          rgb</span> like this:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;    guchar r, g, b;    r = (rgb &gt;&gt; 16) &amp; 0xff;    g = (rgb &gt;&gt; 8) &amp; 0xff;    b = rgb &amp; 0xff;      </pre>            </td>          </tr>        </table>        <p>          However, a convenience function is provided to fill a          <span class="STRUCTNAME">GnomeCanvasBuf</span> with its          <span class="STRUCTNAME">bg_color</span>:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;voidgnome_canvas_buf_ensure_buf (GnomeCanvasBuf *buf){  guchar *bufptr;  int y;  if (!buf-&gt;is_buf) {    bufptr = buf-&gt;buf;    for (y = buf-&gt;rect.y0; y &lt; buf-&gt;rect.y1; y++) {      art_rgb_fill_run (bufptr,                        buf-&gt;bg_color &gt;&gt; 16,                        (buf-&gt;bg_color &gt;&gt; 8) &amp; 0xff,                        buf-&gt;bg_color &amp; 0xff,                        buf-&gt;rect.x1 - buf-&gt;rect.x0);      bufptr += buf-&gt;buf_rowstride;    }    buf-&gt;is_buf = 1;  }}      </pre>            </td>          </tr>        </table>        <p>          As you can see from the implementation of <tt class=           "FUNCTION">gnome_canvas_buf_ensure_buf()</tt>, <span          class="STRUCTNAME">is_bg</span> is a flag indicating that          the RGB buffer still contains random memory garbage; it          has not been initialized with RGB pixels. <span class=           "STRUCTNAME">is_buf</span> indicates that the buffer <i          class="EMPHASIS">has</i> been initialized, and subsequent          items should only draw themselves, ignoring background          pixels. These two flags are mutually exclusive; if your          item receives a buffer with <span class="STRUCTNAME">          is_bg</span> set, it should take steps to fill the          buffer, unset <span class="STRUCTNAME">is_bg</span>, and          set <span class="STRUCTNAME">is_buf</span>:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;  if (buf-&gt;is_bg)    {      gnome_canvas_buf_ensure_buf(buf);      buf-&gt;is_bg = FALSE;    }      </pre>            </td>          </tr>        </table>        <div class="SECT3">          <h3 class="SECT3">            <a name="Z190">Speed and RGB Rendering</a>          </h3>          <p>            If you have a large number of objects, RGB mode can be            faster than GDK mode. Drawing to an RGB buffer is a            simple matter of assigning to an array, which is much,            much faster than making a GDK call (since GDK has to            contact the X server and ask it to do the actual            drawing). The expensive part is copying the RGB buffer            to the X server when you're done. However, the copy            takes the same amount of time no matter how many canvas            items you have, since it is done only once, when all            the items have been rendered.          </p>          <p>            This is a big win in an application called "Guppi" I'm            in the process of writing. Guppi is a plot program. One            of the things it has to do is render a scatter plot            with tens of thousands of points. Each point is a small            colored shape; if I called GDK to render each, there            would be tens of thousands of trips to the X server,            possibly across a network. Instead, I use the canvas in            RGB mode, with a custom canvas item representing the            scatter plot. This allows me to do all the rendering on            the client side, and then the canvas copies the RGB            buffer to the server in a single burst. It's quite fast            and responsive. For less speed-intensive elements of            the plot, such as the legend, I can save time and use            the built-in canvas items.          </p>          <p>            The one difficulty with direct-to-RGB rendering is that            you need a rasterization library comparable to the GDK            drawing primitives if you want to draw anything            interesting. <tt class="APPLICATION">libart_lgpl</tt>            is a very high-quality antialiased rasterization            library, used by the default canvas items. You can use            it in your custom items as well, and it is the best            choice if you will only be drawing hundreds of shapes.            If you're drawing thousands of shapes, however, you'll            quickly see the need for something faster. Fortunately,            this is available; the maintainers of a package called            GNU Plotutils extracted the rasterization library from            the X distribution, and during the development of Guppi            I extracted it from Plotutils and hacked it to work            with the canvas's RGB buffers. I also added alpha            transparency support. The resulting library allows you            to draw on an RGB buffer much as you would draw using            GDK. The library is distributed under the same license            as the X Window System, and is free for anyone to            include with their application.          </p>          <p>            Raph Levien, author of <span class="STRUCTNAME">            libart_lgpl</span> and the GdkRGB module, tells me that            still faster routines could be written; if you need            more speed, consider this a challenge.          </p>        </div>      </div>      <div class="SECT2">        <h2 class="SECT2">          <a name="Z191">The Draw Method (GDK Mode)</a>        </h2>        <p>          Drawing with GDK is much less complicated than drawing          with <tt class="APPLICATION">libart_lgpl</tt>, though it          is also less flexible and produces lower-quality results.          Here is the <span class="STRUCTNAME">          GnomeCanvasRect</span> implementation of the draw method:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;static voidgnome_canvas_rect_draw (GnomeCanvasItem *item, GdkDrawable *drawable,                         int x, int y, int width, int height){  GnomeCanvasRE *re;  double i2w[6], w2c[6], i2c[6];  int x1, y1, x2, y2;  ArtPoint i1, i2;  ArtPoint c1, c2;  re = GNOME_CANVAS_RE (item);  /* Get canvas pixel coordinates */  gnome_canvas_item_i2w_affine (item, i2w);  gnome_canvas_w2c_affine (item-&gt;canvas, w2c);  art_affine_multiply (i2c, i2w, w2c);  i1.x = re-&gt;x1;  i1.y = re-&gt;y1;  i2.x = re-&gt;x2;  i2.y = re-&gt;y2;  art_affine_point (&amp;c1, &amp;i1, i2c);  art_affine_point (&amp;c2, &amp;i2, i2c);  x1 = c1.x;  y1 = c1.y;  x2 = c2.x;  y2 = c2.y;          if (re-&gt;fill_set) {    if (re-&gt;fill_stipple)      gnome_canvas_set_stipple_origin (item-&gt;canvas, re-&gt;fill_gc);    gdk_draw_rectangle (drawable,                        re-&gt;fill_gc,                        TRUE,                        x1 - x,                        y1 - y,                        x2 - x1 + 1,                        y2 - y1 + 1);  }  if (re-&gt;outline_set) {    if (re-&gt;outline_stipple)      gnome_canvas_set_stipple_origin (item-&gt;canvas, re-&gt;outline_gc);    gdk_draw_rectangle (drawable,                        re-&gt;outline_gc,                        FALSE,                        x1 - x,                        y1 - y,                        x2 - x1,                        y2 - y1);  }}      </pre>            </td>          </tr>        </table>        <p>          The draw method receives a drawable (the buffer), the          buffer offsets (<span class="STRUCTNAME">x</span> and          <span class="STRUCTNAME">y</span>---the canvas pixel          coordinates of the buffer), and the buffer's size (<span          class="STRUCTNAME">width</span> and <span class=           "STRUCTNAME">height</span>). <span class="STRUCTNAME">          GnomeCanvasRect</span>'s draw method obtains the          item-to-world and world-to-canvas affines, then composes          (multiplies) them to create an item-to-canvas affine.          (See <a href="z174.html#SEC-AFFINES">the section called          <i>Affine Transformations</i> in the chapter called <i>          <tt class="CLASSNAME">GnomeCanvas</tt></i></a> for more          on affines.) Using this affine, it converts the          rectangle's corner points to canvas pixel coordinates;          then it draws the rectangle, converting the canvas          coordinates to buffer coordinates by subtracting the          buffer offsets.        </p>      </div>    </div>    <div class="NAVFOOTER">      <br>      <br>      <table width="100%" border="0" bgcolor="#ffffff" cellpadding=       "1" cellspacing="0">        <tr>          <td width="25%" bgcolor="#ffffff" align="left">            <a href="cha-canvasitem.html"><font color="#0000ff"            size="2"><b>&lt;&lt;&lt; Previous</b></font></a>          </td>          <td width="25%" colspan="2" bgcolor="#ffffff" align=           "center">            <font color="#0000ff" size="2"><b><a href="ggad.html">            <font color="#0000ff" size="2"><b>            Home</b></font></a></b></font>          </td>          <td width="25%" bgcolor="#ffffff" align="right">            <a href="z192.html"><font color="#0000ff" size="2"><b>            Next &gt;&gt;&gt;</b></font></a>          </td>        </tr>        <tr>          <td colspan="2" align="left">            <font color="#000000" size="2"><b>Writing a <span            class="STRUCTNAME">GnomeCanvasItem</span></b></font>          </td>          <td colspan="2" align="right">            <font color="#000000" size="2"><b>Other            Methods</b></font>          </td>        </tr>      </table>    </div>  </body></html>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
26uuu精品一区二区在线观看| 日韩视频免费观看高清完整版在线观看| 日韩黄色片在线观看| 亚洲精品日韩专区silk| 中文字幕一区二区三区四区 | 精品视频123区在线观看| 丁香激情综合五月| 国产91丝袜在线观看| 成人一区二区视频| 处破女av一区二区| 91玉足脚交白嫩脚丫在线播放| 99久久综合精品| 一本一道综合狠狠老| 欧美亚洲高清一区| 欧美成人在线直播| 久久精品一区二区| 亚洲欧美日韩人成在线播放| 一区二区三区国产精华| 免费在线观看视频一区| 国产精品一区一区三区| 成人avav影音| 在线观看91av| 久久久久国产精品人| 国产精品电影院| 亚洲国产精品视频| 国产精品资源在线| 在线看一区二区| 精品欧美黑人一区二区三区| 国产精品成人免费在线| 天天色综合成人网| 国产成人精品免费在线| 色拍拍在线精品视频8848| 日韩一区二区三区精品视频| 亚洲欧洲精品一区二区三区| 香蕉久久一区二区不卡无毒影院| 麻豆精品视频在线观看免费 | 色综合久久综合| 欧美一区二区三区四区视频| 欧美国产97人人爽人人喊| 亚洲国产日韩a在线播放| 国产一区亚洲一区| 欧美性猛交xxxxxxxx| 久久久久久久久久美女| 亚洲国产成人高清精品| 成人免费观看男女羞羞视频| 欧美一区二区大片| 亚洲自拍与偷拍| 国产成人在线视频免费播放| 欧美久久久久久久久| 国产精品久久久久影院色老大| 日韩专区欧美专区| 色屁屁一区二区| 日本一二三不卡| 国产一区二区美女| 在线播放国产精品二区一二区四区| 国产亚洲欧美日韩在线一区| 日韩成人一区二区三区在线观看| 成人精品小蝌蚪| 精品国产乱码久久久久久免费| 亚洲自拍偷拍欧美| 色哟哟一区二区三区| 日本一二三四高清不卡| 国产精品自拍一区| 久久丝袜美腿综合| 精油按摩中文字幕久久| 欧美一区二区三区日韩视频| 日韩在线观看一区二区| 欧美性视频一区二区三区| **性色生活片久久毛片| 成人理论电影网| 国产精品网站在线| 国产成人在线视频播放| 久久免费电影网| 国产一区二区主播在线| 久久精品一区二区三区不卡| 国产麻豆一精品一av一免费 | 亚洲第一狼人社区| 欧美视频精品在线观看| 亚洲v中文字幕| 欧美日韩一区二区三区视频| 亚洲国产欧美在线| 欧美精品久久99久久在免费线| 婷婷六月综合亚洲| 日韩欧美的一区二区| 喷水一区二区三区| 久久久久久日产精品| 国产999精品久久久久久绿帽| 中文一区二区在线观看| 91女厕偷拍女厕偷拍高清| 一区二区三区在线观看网站| 欧美在线播放高清精品| 亚洲成人免费视频| 国产精品热久久久久夜色精品三区| 国产乱理伦片在线观看夜一区 | 日韩毛片一二三区| 91久久一区二区| 午夜成人免费视频| xfplay精品久久| 成人免费视频视频在线观看免费 | 91久久精品午夜一区二区| 亚洲一区免费观看| 日韩一本二本av| 成人美女在线视频| 亚洲一区二区三区在线播放| 制服丝袜亚洲播放| 国产在线一区观看| 亚洲精品国产a久久久久久 | 国产欧美日韩综合| 在线免费观看成人短视频| 久久66热偷产精品| 亚洲人成在线观看一区二区| 欧美一区二区三区视频在线| 成熟亚洲日本毛茸茸凸凹| 一区二区日韩av| 久久久99精品免费观看不卡| 色哟哟精品一区| 国产一区视频网站| 亚洲一二三四区| 久久久99精品久久| 7777女厕盗摄久久久| 成人午夜电影网站| 美女在线一区二区| 一区二区三区四区在线| 精品久久久久久综合日本欧美| 91免费视频网址| 国产精品一区不卡| 午夜精品国产更新| 亚洲精品日韩一| 国产精品成人一区二区艾草| 亚洲精品在线免费观看视频| 久久久噜噜噜久久中文字幕色伊伊 | 欧美v亚洲v综合ⅴ国产v| 91福利精品第一导航| 成人va在线观看| 国产精品中文字幕欧美| 麻豆精品一二三| 日一区二区三区| 婷婷久久综合九色综合伊人色| 日韩毛片在线免费观看| 国产精品国模大尺度视频| 久久嫩草精品久久久精品一| 日韩一区二区免费视频| 欧美色爱综合网| 色狠狠一区二区三区香蕉| 成人av网址在线| 国产精品18久久久久久vr| 精品一区二区三区在线播放视频| 日韩成人一区二区三区在线观看| 亚洲国产日韩一级| 性做久久久久久免费观看| 一区二区三区日本| 亚洲另类在线制服丝袜| 亚洲综合一二三区| 一区二区三区日韩欧美| 亚洲一区二区三区视频在线| 亚洲综合激情网| 亚洲国产另类av| 午夜精品久久久久| 美女诱惑一区二区| 精品一区二区免费看| 久久99精品一区二区三区 | 中文字幕不卡在线观看| 国产亚洲自拍一区| 国产精品毛片久久久久久| 日本一区二区三区dvd视频在线| 久久综合久久久久88| 国产视频一区在线观看| 中文字幕日韩一区| 亚洲精品第一国产综合野| 亚洲一区在线观看免费观看电影高清 | 日韩写真欧美这视频| ww亚洲ww在线观看国产| 中文字幕精品一区二区三区精品| 亚洲视频一区在线| 亚洲第一av色| 国模娜娜一区二区三区| 99精品国产一区二区三区不卡| 91在线精品一区二区三区| 欧美性感一类影片在线播放| 欧美一区二区人人喊爽| 国产欧美日韩综合精品一区二区| 亚洲欧美日韩精品久久久久| 日韩影院精彩在线| 成人在线一区二区三区| 精品视频在线免费看| 精品国产精品一区二区夜夜嗨| 国产欧美一区视频| 亚洲国产综合视频在线观看| 国产综合久久久久久久久久久久| 日韩一区二区麻豆国产| 久久一二三国产| 亚洲欧美日韩中文字幕一区二区三区| 视频一区欧美精品| 暴力调教一区二区三区| 日韩午夜精品电影| 亚洲情趣在线观看| 美女视频一区二区三区| 色一情一伦一子一伦一区| 久久综合九色综合欧美就去吻| 亚洲精品国产a|