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

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

?? gnome-canvas-items.html

?? linux下gnome編程
?? HTML
?? 第 1 頁 / 共 3 頁
字號:
<HTML><HEAD><TITLE>Canvas Items</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.61"><LINKREL="HOME"TITLE="Writing GNOME Applications"HREF="index.html"><LINKREL="UP"TITLE="The GNOME Canvas"HREF="gnome-canvas.html"><LINKREL="PREVIOUS"TITLE="Using the Canvas"HREF="gnome-canvas-using.html"><LINKREL="NEXT"TITLE="Canvas Events"HREF="gnome-canvas-events.html"></HEAD><BODYCLASS="SECT1"><DIVCLASS="NAVHEADER"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">Writing GNOME Applications</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="gnome-canvas-using.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 11. The GNOME Canvas</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="gnome-canvas-events.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="GNOME-CANVAS-ITEMS">Canvas Items</A></H1><P>        The GNOME Canvas wouldn't amount to as much without its ample        selection of Canvas items. By choosing your Canvas items        carefully, you can drastically reduce the amount of coding you        need to do to mold the Canvas to your purposes. Out of the        box, the Canvas comes with several vector-based items, a        couple of pixmap items, a text-rendering item, and even an        item for embedding GTK+ widgets into the Canvas. If these        aren't enough for you, you can always create new customized        Canvas items for your application.  Unfortunately, we don't        have room in this book to describe how to create new Canvas        items. If you're interested, take a look at the source code        for the current crop of Canvas items and read up on how to        derive new objects from GtkObject.      </P><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN1161">Vector-Based Drawing Items</A></H2><P>          The Canvas comes with four vector-based drawing items: line,          rectangle, ellipse, and polygon. These Canvas items share          certain common properties for defining the appearance of the          drawing items (see Table 11.1).        </P><P>          The three categories of properties here are the fill color,          the stipple pattern, and the line width. Each of these three          categories can hold only one value, so, for example, if you          set the fill color property as fill_color, and then as          fill_color_rgba, the second option would override the          first. This is also the case with the two width properties.        </P><P>          Let's look at fill_color first. This property determines the          item's interior color. For a closed polygon, rectangle, or          ellipse, this is the color for the inside of the shape; for          a GnomeCanvasLine item, fill_color refers to the color of          the line itself. This is somewhat confusing because the line          item doesn't have an interior area to fill. The interior of          the line is the line.        </P><P>          The fill_color property has a gchar* type, which it passes          on to gdk_color_parse( ) to retrieve an RGB value for that          color (see Section 10.2.2). The other two related properties          let you set the fill color with a GdkColor you've already          allocated for fill_color_gdk, or with the native RGBA guint          value for the fill_color_rgba property. Don't forget that          the alpha channel is ignored in a GDK-mode Canvas, so unless          you are using the anti-aliased Canvas, you should always set          the alpha channel to 0xff.        </P><P>          In addition to setting the color of the item's fill area,          you can set up a bitmap to mask out a repeating pattern          throughout the area of your fill. The fill_stipple property          expects a GdkBitmap* value, most likely created with          gdk_bitmap_create_from_data( ). The respective Canvas item          will tile this bitmap across the entire fill area covered by          the fill_color properties. In the case of the          GnomeCanvasLine item, the fill_stipple pattern will mask out          the line itself. Note that the stipple is not adaptive at          all. If your line changes direction, the stipple will not          change direction. If you want a stipple pattern that, for          example, is always perpendicular to your line, you will have          to create different stipple patterns for each new angle of          line segment. An alternative to this is the line_style          property, which we'll discuss in Section 11.4.2. Note that          the AA Canvas does not currently support the stipple          properties, so stippling works only in a GDK Canvas.        </P><P>          The width properties are a little more straightforward; they          refer to the width of the lines. The width_pixels property          sets the width of all lines in that Canvas item- whether          it's a line item or the outline of a closed shape-to a fixed          width in canvas coordinates (i.e., screen pixels). If you          zoom the Canvas in or out with          gnome_canvas_set_pixels_per_unit( ), your lines will stay          the same visible width. Conversely, width_units sets the          line width in world coordinates, so when you zoom in, your          lines will be visibly wider and vice versa. Note that          width_pixels has a type of guint, just like the canvas          coordinate system, and width_units has a type of gdouble,          like world coordinates. Be very careful not to mix these          units up in the parameter list because the two types are of          different size and will disrupt the variable argument pars-          ing if reversed. To illustrate, this function call would          probably crash your application:        </P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="PROGRAMLISTING">gnome_canvas_item_set(item, "width_units", 2, NULL);        </PRE></TD></TR></TABLE><P>          The correct way to specify width_units is either to cast the          value to a gdouble type or to explicitly include the decimal          point, as in these two examples:        </P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="PROGRAMLISTING">gnome_canvas_item_set(item, "width_units", (gdouble)2, NULL);gnome_canvas_item_set(item, "width_units", 2.0, NULL);        </PRE></TD></TR></TABLE><P>          The closed shapes have another set of properties for dealing          with the appearance of their outlines. These properties          have a one-to-one correspondence with the fill          properties. Thus you can arrange for colors, transparencies,          and stipple patterns for the outlines of an ellipse,          rectangle, or polygon that are separate from those you have          established for its interior. Conversely, you won't find the          outline properties in a GnomeCanvasLine item because exactly          the same characteristics are covered by the line's fill          properties. Table 11.2 lists the outline properties.        </P><P>          We'll wrap up our discussion of fills and stipples with a          brief example.  The source code is given in Listing          11.1. This example will draw a tan ellipse with a red          outline, 6.0 world coordinate units wide. The tan interior          will have a diagonal hatching pattern, while the red outline          will have a stipple pattern with horizontal stripes. Figure          11.3 shows how we arrived at the hexadecimal contents of the          stipple bitmaps, and Figure 11.4 shows how this ellipse item          will look on a Canvas. The code assumes that you've already          created the Canvas elsewhere, and that group is a pointer to          a GnomeCanvasGroup item inside that Canvas. For now, you          can take for granted that the x1, y1, x2, and y2 properties          define the ellipse's bounding box. Notice that we must put          the top and left coordinates at 3.0 rather than 0.0, to          avoid clipping the 6.0-unit-wide outline (assuming that our          scrolling region starts at 0.0 in both axes and has a          one-to-one scaling ratio, of course). This demonstrates the          policy that the true coordinates of Canvas lines are          centered in the middle of the line rather than on a rendered          edge. We'll delve into shapes and sizes more deeply in          Section 11.4.3.        </P><DIVCLASS="FIGURE"><ANAME="AEN1174"></A><P><B>Figure 11-3. Bitmaps for Stipple Masks</B></P><DIVCLASS="MEDIAOBJECT"><P><IMGSRC="figures/11f3.png"></IMG></P></DIV></DIV><DIVCLASS="FIGURE"><ANAME="AEN1179"></A><P><B>Figure 11-4. Stipple Mask Example</B></P><DIVCLASS="MEDIAOBJECT"><P><IMGSRC="figures/11f4.png"></IMG></P></DIV></DIV><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="PROGRAMLISTING">Listing 11.1 Sample Code for Stippled Ellipse Canvas ItemGnomeCanvasItem *item;GdkBitmap *dstipple;GdkBitmap *hstipple;static char diagonal_stipple[] = { 0x0d, 0x0e, 0x07, 0x0b };static char horizontal_stipple[] = { 0x03, 0x00, 0x00 };/* Create bitmaps for stipple masks */dstipple = gdk_bitmap_create_from_data(NULL,  diagonal_stipple, 4, 4);hstipple = gdk_bitmap_create_from_data(NULL,  horizontal_stipple, 2, 3);item = gnome_canvas_item_new(group, GNOME_TYPE_CANVAS_ELLIPSE,  "x1", 3.0, "y1", 3.0, "x2", 250.0, "y2", 100.0,  "fill_color", "tan",  "fill_stipple", dstipple,  "outline_color", "red",  "outline_stipple", hstipple,  "width_units", 6.0, NULL);        </PRE></TD></TR></TABLE></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN1185">Line Styles</A></H2><P>          Just as the closed-shape Canvas items have outline          properties that the line item doesn't have, the line item          has some special properties that none of the closed-shape          items have. Table 11.3 lists these properties. The          GnomeCanvasLine item has quite a number of interesting          features, allowing you to customize the arrowheads, the          dotted line style, elbow shapes, and the general quality of          the lines. Each feature has exactly one property name,          unlike the fill, outline, and width properties.        </P><P>          Some of the line style properties correspond directly to          native GDK line styles, and as such they work only in GDK          mode. Don't be confused if your line styles suddenly          disappear when you switch to AA mode, because they may not          be supported in that mode. Listings 11.2 through 11.4 show          the possible values of these enumerations, as defined in          gtk+/gdk/gdktypes.h.        </P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="PROGRAMLISTING">Listing 11.2 GdkCapStyle Enumerationtypedef enum{  GDK_CAP_NOT_LAST,  GDK_CAP_BUTT,  GDK_CAP_ROUND,  GDK_CAP_PROJECTING} GdkCapStyle;        </PRE></TD></TR></TABLE><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="PROGRAMLISTING">Listing 11.3 GdkJoinStyle Enumerationtypedef enum{  GDK_JOIN_MITER,  GDK_JOIN_ROUND,  GDK_JOIN_BEVEL} GdkJoinStyle;        </PRE></TD></TR></TABLE><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="PROGRAMLISTING">Listing 11.4 GdkLineStyle Enumerationtypedef enum{  GDK_LINE_SOLID,  GDK_LINE_ON_OFF_DASH,  GDK_LINE_DOUBLE_DASH} GdkLineStyle;        </PRE></TD></TR></TABLE><P>          Arrowheads are available in both Canvas modes. Each

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
青青国产91久久久久久| 久久99久久精品| 欧美国产综合色视频| 精品欧美乱码久久久久久| 欧美欧美欧美欧美首页| 欧美午夜不卡在线观看免费| 91丨porny丨首页| 欧美性一级生活| 日韩一区二区三区在线观看| 91精品蜜臀在线一区尤物| 欧美日韩在线亚洲一区蜜芽| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 高清在线成人网| 在线视频中文字幕一区二区| 欧美日韩精品系列| 亚洲少妇中出一区| 国产日韩成人精品| 日韩精品在线一区| 亚洲美女视频一区| 色伊人久久综合中文字幕| 国产欧美一区二区三区鸳鸯浴 | 精品成人私密视频| 蜜臀a∨国产成人精品| 久久精品噜噜噜成人88aⅴ| 美女www一区二区| 99天天综合性| 国产夜色精品一区二区av| 亚洲男人都懂的| 国v精品久久久网| 91精品国产综合久久蜜臀| 自拍偷拍欧美精品| 粉嫩av一区二区三区| 91精品国产综合久久国产大片| 国产精品欧美一区喷水| 美女视频黄a大片欧美| 在线视频国产一区| 国产精品国产三级国产| 国产一区二三区| 26uuu亚洲综合色欧美| 青青草原综合久久大伊人精品 | 日韩女同互慰一区二区| 日韩一区精品字幕| 777午夜精品免费视频| 肉丝袜脚交视频一区二区| 欧美日韩黄视频| 97精品国产露脸对白| 91成人看片片| 国产成人综合在线播放| 五月婷婷色综合| 激情综合网天天干| 99久久精品情趣| 自拍av一区二区三区| 日韩黄色免费电影| 6080国产精品一区二区| 青青国产91久久久久久| 欧美电影免费观看高清完整版在| 久久99久久精品| 国产欧美视频一区二区三区| 成人夜色视频网站在线观看| 亚洲欧美日韩久久| 欧美一区二区在线免费观看| 国产精品亚洲第一区在线暖暖韩国 | 亚洲人成网站在线| 欧美一区二区三区在线电影| 国产成人午夜99999| 一区二区久久久| 日韩你懂的在线观看| 99久久久国产精品免费蜜臀| 亚洲伦理在线精品| www成人在线观看| 欧美亚洲国产一区二区三区va| 国产一区二区在线免费观看| 亚洲丝袜自拍清纯另类| 久久精品视频一区二区三区| 欧美日韩亚洲综合| 国产91精品一区二区麻豆网站| 最新成人av在线| 国产清纯白嫩初高生在线观看91 | 欧美日韩卡一卡二| 成人国产视频在线观看| 麻豆精品在线看| 亚洲妇熟xx妇色黄| 亚洲国产aⅴ天堂久久| 亚洲精品一卡二卡| 亚洲丝袜自拍清纯另类| 国产农村妇女精品| 精品电影一区二区| 欧美一区二区三区喷汁尤物| 欧美丝袜丝nylons| 欧美午夜一区二区三区免费大片| 色天天综合色天天久久| 99久久99久久精品免费看蜜桃 | 欧美午夜片在线看| 日本韩国一区二区| 91精品中文字幕一区二区三区| 欧美在线免费观看亚洲| 欧美日韩国产三级| 日韩欧美一级片| 国产亚洲1区2区3区| 日本一区二区在线不卡| 亚洲欧美激情一区二区| 一区二区三区精品| 久久99国产精品尤物| 丁香网亚洲国际| 在线亚洲人成电影网站色www| 欧美午夜在线一二页| 久久九九久久九九| 亚洲人成网站在线| 久久电影网站中文字幕| 99久久免费视频.com| 欧美一级理论片| 一色屋精品亚洲香蕉网站| 性欧美大战久久久久久久久| 欧美亚一区二区| 国产精品久久看| 在线观看欧美日本| 麻豆中文一区二区| 欧美日韩高清一区二区不卡| 亚洲va中文字幕| 9191成人精品久久| 精品系列免费在线观看| 欧美韩国日本不卡| 91久久国产最好的精华液| 亚洲日韩欧美一区二区在线| 91国产丝袜在线播放| 午夜欧美视频在线观看| 欧美一区二区三区男人的天堂| 久久99国内精品| 中文字幕在线一区| 欧美丰满少妇xxxxx高潮对白| 蜜臀av性久久久久蜜臀aⅴ四虎| 精品理论电影在线观看| 色综合久久久久久久| 美国三级日本三级久久99 | 国产精品亚洲综合一区在线观看| 国产精品理论在线观看| 7777精品伊人久久久大香线蕉经典版下载 | 在线观看亚洲专区| 国产在线一区二区| ●精品国产综合乱码久久久久| 欧美亚洲自拍偷拍| 国产成人欧美日韩在线电影| 亚洲综合清纯丝袜自拍| 欧美mv日韩mv国产| 一本到不卡免费一区二区| 日本亚洲视频在线| 国产精品福利在线播放| 欧美男同性恋视频网站| 国产乱码精品一区二区三区av| 国产精品久久久久久亚洲伦| 欧美日韩在线直播| 国产91在线|亚洲| 蜜桃精品视频在线观看| 亚洲欧洲一区二区在线播放| 国产丝袜美腿一区二区三区| 在线电影国产精品| 色欧美日韩亚洲| 黄色资源网久久资源365| 日本伊人午夜精品| 日韩中文字幕1| 麻豆国产一区二区| 精品一区二区三区免费播放 | 欧美日韩国产综合视频在线观看| 91亚洲精品久久久蜜桃| 成人午夜激情视频| 99久久99久久精品国产片果冻| 亚洲动漫第一页| 亚洲自拍偷拍网站| 亚洲私人黄色宅男| 亚洲一区二区三区视频在线 | www.欧美亚洲| 成人激情小说乱人伦| 成人在线一区二区三区| av成人老司机| 欧美在线免费播放| 日韩一区二区三区电影在线观看| 精品国产成人系列| 亚洲夂夂婷婷色拍ww47 | 国产色产综合产在线视频| 亚洲欧洲精品成人久久奇米网| 亚洲电影视频在线| 菠萝蜜视频在线观看一区| 欧美tickling网站挠脚心| 亚洲一区视频在线| 国内成人精品2018免费看| 国产91精品一区二区麻豆亚洲| 在线亚洲高清视频| 久久久久久影视| 亚洲福利视频导航| 福利电影一区二区| 在线不卡中文字幕| 亚洲欧美日韩国产中文在线| 国产精品资源网站| 欧美一a一片一级一片| 久久久亚洲精品一区二区三区| 日韩理论片中文av| 捆绑紧缚一区二区三区视频| 在线观看欧美精品| 国产精品美女久久久久av爽李琼 | 丁香一区二区三区|