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

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

?? gnome-canvas-items.html

?? linux下gnome編程
?? HTML
?? 第 1 頁 / 共 3 頁
字號:
          GnomeCanvasLine item can optionally have one arrowhead at          the starting point and another at the ending point of the          line. The Boolean first_arrowhead and last_arrowhead          properties determine whether or not the line item should          display an arrowhead at that position in the line. By          default, the arrowheads are turned off. If a line item has          more than one line segment (e.g., a line with four points          and three line segments), the arrowheads will show up only          at the first and last points. To support an arrowhead at          every vertex, the Canvas item would in theory have to          declare a variable-length array of Boolean nth_arrowhead          properties, one for each point in the line. For reasons of          simplicity, GnomeCanvasLine does not go this extra          mile. If you want arrowheads at each point, you have to use          a different GnomeCanvasLine item for each line segment.        </P><P>          The three remaining arrow_shape_* properties define the          shape and size of all arrowheads on that line item. Each          property determines a measurable distance, in world          coordinates, that GnomeCanvasLine will trace when drawing          the arrowheads. Starting from a point at the end of the          line, arrow_shape_a runs straight out, parallel to the line,          measuring how far forward the arrow will stretch. The          arrow_shape_b property measures how far backward from the          arrow's tip the arrowhead will extend. The final property,          arrow_shape_c, measures how far perpendicularly from the          line the arrow extends-that is, the arrowhead's          width. Figure 11.5 illustrates what the shape properties          look like in practice.        </P><DIVCLASS="FIGURE"><ANAME="AEN1194"></A><P><B>Figure 11-5. Arrow Shapes for GnomeCanvasLine Item</B></P><DIVCLASS="MEDIAOBJECT"><P><IMGSRC="figures/11f5.png"></IMG></P></DIV></DIV></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN1199">The Shape of the Item</A></H2><P>          Of the four vector-based Canvas items-rectangle, ellipse,          polygon, and line- we have covered all the available          properties except for the most important ones: the          coordinates that determine their locations on the          Canvas. Table 11.4 lists these properties.        </P><P>          The rectangle and ellipse items both use the opposite          corners of a bounding box to determine their size and          location on the Canvas. The rectangle inscribes itself          directly on the bounding box, so that the bounding box be-          comes the rectangle. The ellipse item renders itself inside          of a similar bounding box. If you created a rectangle item          and an ellipse item with the same bounding box, the          rectangle would completely enclose the ellipse; the ellipse          would meet up with the rectangle at the midpoint of each of          the rectangle's four sides (see Figure 11.6).        </P><DIVCLASS="FIGURE"><ANAME="AEN1203"></A><P><B>Figure 11-6. Rectangle and Ellipse Canvas Items with the Same Bounding Box</B></P><DIVCLASS="MEDIAOBJECT"><P><IMGSRC="figures/11f6.png"></IMG></P></DIV></DIV><P>          In fact, the rectangle and ellipse items are derived from          the same abstract Canvas item, GnomeCanvasRE, which defines          all the properties used by both derived items, along with          quite a lot of shared code for handling the bounding box,          the fill colors, the stippling, and all the other          properties. Rectangles and ellipses both use the x1, y1, x2,          and y2 properties to define their bounding boxes. These          properties are all world coordinates, which means they must          be passed in as gdouble types. As we learned earlier, one of          the most common reasons for crash-causing bugs in Canvas          applications is accidentally passing an integer here instead          of a gdouble, so be careful!        </P><P>          The line and polygon Canvas items use similar properties to          define their locations, although their free-form,          variable-point nature dictates that they use a technique          different from that of the rectangle and the ellipse. A line          or polygon can have as few as two points (in the case of the          line) or three (in the case of the polygon), and as many          points as you care to render. If these items were to support          the same style of properties as the rectangle, they would          have to define a potentially infinite number of item          properties, along the lines of x1, y1, x2, y2, x3, y3,          . . ., xn, yn. These two Canvas items solve the problem by          wrapping their variable-length coordinate arrays inside a          GnomeCanvasPoints structure and passing a pointer to that          structure as the points item property. The GnomeCanvasPoints          structure looks like this:        </P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="PROGRAMLISTING">typedef struct{  int num_points;  double *coords;  int ref_count;} GnomeCanvasPoints;        </PRE></TD></TR></TABLE><P>          You can create the array and populate the structure with          this function:        </P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="PROGRAMLISTING">GnomeCanvasPoints *gnome_canvas_points_new (int num_points);        </PRE></TD></TR></TABLE><P>          The num_points field holds the number of points in the array          rather than the total length of the array. Thus a pentagon          would have a num_points value of 5 and an array of 10          doubles, dynamically allocated and stored in the coords          field. The x coordinates are always in the even array          elements, the y coordinates in the odd elements. After you          create the GnomeCanvasPoints structure, you can fill the          array by accessing the coords array directly. You must be          very careful not to overrun this array, and it's up to you          to make sure you don't. The simplest way to fill the array          is to set each element explicitly:        </P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="PROGRAMLISTING">GnomeCanvasPoints *points;points = gnome_canvas_points_new(3);points-&#62;coords[0] = 0.0;     /* x1 */points-&#62;coords[1] = 100.0;   /* y1 */points-&#62;coords[2] = 50.0;    /* x2 */points-&#62;coords[3] = 0.0;     /* y2 */points-&#62;coords[4] = 100.0;   /* x3 */points-&#62;coords[5] = 100.0;   /* y3 */        </PRE></TD></TR></TABLE><P>          This method is not very scalable, however, and it can become          rather messy for a complex polygon with lots of points. An          alternative is to create your points in a static array, in          which you can declare the series of points in a compact          manner, and then use memcpy( ) to copy them to the existing          coords array. This approach leads to leaner code but carries          with it the dangers of pointer operations, which can          increase the likelihood of crash-inducing bugs in your          application. Keep your calls to memcpy( ) to a minimum, and          pay particular attention to the difference between the          number of points in the array (i.e., num_points), and the          actual length of the array (i.e., num_points 2).  Here's          what the previous example would look like with the second          approach:        </P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="PROGRAMLISTING">GnomeCanvasPoints *points;gdouble pts_array[] = { 0.0, 100.0, 50.0, 0.0, 100.0, 100.0 };points = gnome_canvas_points_new(3);memcpy(points-&#62;coords, pts_array, sizeof(pts_array));        </PRE></TD></TR></TABLE><P>          When you're done with your GnomeCanvasPoints structure, you          call the unref function to release it. GnomeCanvasPoints          keeps a reference count so that you can safely share a          points array with other items if necessary. Call the _ref          function instead of the _new function for each extra item          that wants to use the same array, after the first          one. Later, as each item finishes with the array, the item          unreferences it, thereby decrementing the ref_count          field. When ref_count reaches zero, the GnomeCanvasPoints          array automatically cleans itself up. The _ref and _unref          functions look like this:        </P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="PROGRAMLISTING">GnomeCanvasPoints *gnome_canvas_points_ref(    GnomeCanvasPoints *points);void gnome_canvas_points_unref(GnomeCanvasPoints *points);        </PRE></TD></TR></TABLE><P>          An alternative line-based Canvas item that is not included          in the 1.2 version of gnome-libs is the GnomeCanvasBpath          item, from the gnome-print package. This item is very          similar to GnomeCanvasLine, except it uses an ArtBpath          structure to describe its shape rather than a          GnomeCanvasPoints structure, and it includes an extra          property to describe its winding rules. It may or may not          someday be included in the gnome-libs package.        </P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN1220">Widgets in the Canvas</A></H2><P>          Although the Canvas is most commonly used as a buffered          drawing surface, its object-oriented nature makes it easy to          extend into new areas. One such area is the ability to embed          a widget into the Canvas as a full-fledged Canvas item.          Since the GnomeCanvasWidget item is just a wrapper for a          widget, it doesn't need many properties (see Table 11.5).        </P><P>          The widget property holds a pointer to the widget          itself. The x, y, width, and height properties determine the          widget's placement inside the Canvas, in world          coordinates. If you need to resize a GnomeCanvasWidget item,          you should do it with these properties rather than trying to          call gtk_widget_set_usize( ) on it. If you try to bypass the          Canvas properties, the Canvas will just return the widget to          whatever size it thinks the widget should be during the next          repaint.        </P><P>          The x and y coordinates don't necessarily point to the upper          left corner of the widget. By default, if you don't set the          anchor property, that's where the anchor will end          up. Sometimes, however, it's nice to be able to align          widgets with a different corner, at the widget's center, or          even at the midpoint of a side.  The anchor property gives          you this power, borrowing the GtkAnchorType enumeration          from GTK+. Listing 11.5 lists the alignment          possibilities. The anchor types are based on the compass          points, and should be self-explanatory.        </P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="PROGRAMLISTING">Listing 11.5 GtkAnchorType Enumerationtypedef enum{  GTK_ANCHOR_CENTER,  GTK_ANCHOR_NORTH,  GTK_ANCHOR_NORTH_WEST,  GTK_ANCHOR_NORTH_EAST,  GTK_ANCHOR_SOUTH,  GTK_ANCHOR_SOUTH_WEST,  GTK_ANCHOR_SOUTH_EAST,  GTK_ANCHOR_WEST,  GTK_ANCHOR_EAST,  GTK_ANCHOR_N = GTK_ANCHOR_NORTH,  GTK_ANCHOR_NW = GTK_ANCHOR_NORTH_WEST,  GTK_ANCHOR_NE = GTK_ANCHOR_NORTH_EAST,  GTK_ANCHOR_S = GTK_ANCHOR_SOUTH,  GTK_ANCHOR_SW = GTK_ANCHOR_SOUTH_WEST,  GTK_ANCHOR_SE = GTK_ANCHOR_SOUTH_EAST,  GTK_ANCHOR_W = GTK_ANCHOR_WEST,  GTK_ANCHOR_E = GTK_ANCHOR_EAST} GtkAnchorType;        </PRE></TD></TR></TABLE></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN1226">Text Canvas Items</A></H2><P>          So far, we've discussed Canvas items for drawing lines and          polygons and for embedding widgets. Another important          feature you'll need sooner or later is the ability to render          text into the Canvas. The GnomeCanvasText item provides this          functionality.        </P><P>          The text item shares several of its properties with the          other items. Its x, y, and anchor properties work in the          same way as those for the GnomeCanvasWidget item; they          specify where the text is attached to the          Canvas. GnomeCanvasText also shares the fill_color,          fill_color_gdk, and fill_stipple properties with the          vector-based items (see Table 11.1), to define the color and          stipple pattern of the text. Table 11.6 shows all the          properties of the text item.        </P><P>          You can set the text itself with the text property, and the          font of that text with one of the three font properties:          font, fontset, and font_gdk. Like the fill color properties          of the vector-based canvas items, the font properties all          affect the same value within the item. This value resolves          more or less to a GdkFont* pointer, regardless of which font          property you use. Changing the font may also trigger some          formatting and size recalculations because the text may lie          differently in the new font, especially if the text is          centered. You can change the text justification with the          justification property, which takes a value of          GtkJustification (see Listing 11.6).        </P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="PROGRAMLISTING">Listing 11.6 GtkJustification Enumerationtypedef enum{  GTK_JUSTIFY_LEFT,  GTK_JUSTIFY_RIGHT,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产另类一区| 亚洲永久精品国产| 1000精品久久久久久久久| 亚洲免费大片在线观看| 水野朝阳av一区二区三区| 另类调教123区 | 欧美怡红院视频| 91精品国产综合久久精品| 国产亚洲精品7777| 一区二区三区四区视频精品免费 | 91精品国产欧美一区二区成人| 欧美不卡一区二区| 中文字幕+乱码+中文字幕一区| 一区二区三区产品免费精品久久75| 蜜桃av噜噜一区| 91女神在线视频| 欧美mv和日韩mv的网站| 亚洲色图.com| 裸体一区二区三区| 91污在线观看| 精品第一国产综合精品aⅴ| 亚洲美女免费视频| 国产一区二区三区在线观看精品| 色综合久久九月婷婷色综合| 精品奇米国产一区二区三区| 麻豆成人久久精品二区三区小说| 99视频一区二区| 日韩一区二区在线播放| 亚洲免费av网站| 国产美女在线精品| 欧美男男青年gay1069videost| 欧美经典三级视频一区二区三区| 五月婷婷欧美视频| 97成人超碰视| 久久久www成人免费毛片麻豆| 亚洲综合在线视频| 波多野结衣91| 欧美精品一区二区精品网| 亚洲一区二区中文在线| 不卡一区二区三区四区| 欧美不卡在线视频| 日韩中文字幕亚洲一区二区va在线| eeuss国产一区二区三区| 欧美电视剧在线看免费| 亚洲大片在线观看| 日本伦理一区二区| 国产精品久久影院| 国产乱码精品一区二区三| 欧美精品v日韩精品v韩国精品v| 亚洲欧美韩国综合色| 成人毛片在线观看| 久久精品视频免费| 蜜臀久久99精品久久久久宅男 | 亚洲国产成人tv| 91免费看`日韩一区二区| 国产日韩综合av| 韩国欧美国产一区| 欧美大肚乱孕交hd孕妇| 午夜私人影院久久久久| 在线亚洲一区二区| 亚洲欧美另类在线| 99视频一区二区| 中文字幕一区av| 97久久精品人人做人人爽| 久久精品一二三| 国产精品系列在线观看| 精品免费国产一区二区三区四区| 蜜臀久久99精品久久久画质超高清| 欧美男女性生活在线直播观看| 亚洲高清视频中文字幕| 久久久久国产精品免费免费搜索| 久久精品国产第一区二区三区| 日韩欧美国产综合一区| 久久国产精品无码网站| 精品日韩欧美在线| 国产乱码精品一区二区三区五月婷| 亚洲精品在线一区二区| 国产一区二三区| 久久久亚洲午夜电影| 国产99精品视频| 亚洲国产岛国毛片在线| 99久精品国产| 亚洲免费在线电影| 欧美在线色视频| 日本午夜一区二区| 日韩精品一区二区三区蜜臀| 韩国理伦片一区二区三区在线播放| 精品国产网站在线观看| 国产一区二区按摩在线观看| 久久精品欧美一区二区三区不卡| 东方欧美亚洲色图在线| 亚洲三级在线免费观看| 欧美日本韩国一区二区三区视频 | 欧美精品一级二级三级| 日本中文字幕一区二区有限公司| 日韩精品影音先锋| 国产精品996| 中文字幕在线观看不卡视频| 91福利国产成人精品照片| 五月天亚洲精品| 日韩欧美国产三级电影视频| 国产在线日韩欧美| 中文字幕日本不卡| 欧美性生活一区| 久久电影网站中文字幕 | 成人自拍视频在线观看| 一区二区三区丝袜| 欧美一级一区二区| 国产精品一区二区三区乱码| 136国产福利精品导航| 91精品国产入口| 国产91在线|亚洲| 亚洲国产精品久久人人爱| 欧美一级二级三级蜜桃| 丰满白嫩尤物一区二区| 亚洲午夜免费视频| 久久综合狠狠综合| 在线一区二区三区做爰视频网站| 麻豆精品一区二区综合av| 最近日韩中文字幕| 欧美一区二视频| 成人sese在线| 免费观看日韩电影| 亚洲天堂精品在线观看| 日韩一区二区视频| 色综合av在线| 欧美猛男男办公室激情| 国产精品自拍网站| 亚洲在线视频网站| 久久蜜臀中文字幕| 欧美日韩国产系列| 国产成人免费9x9x人网站视频| 亚洲精品久久嫩草网站秘色| 欧美一区二区三区免费| 亚洲网友自拍偷拍| 国产农村妇女毛片精品久久麻豆 | 亚洲色图视频网站| 欧美一卡2卡三卡4卡5免费| 懂色av一区二区三区蜜臀| 亚洲视频在线观看三级| 精品国产乱码久久久久久影片| 99国产精品久久久久| 免费一级片91| 亚洲人成人一区二区在线观看 | 尤物视频一区二区| 精品久久久久久最新网址| 成人国产视频在线观看| 久久激情综合网| 亚洲国产精品一区二区尤物区| 国产色综合一区| 56国语精品自产拍在线观看| 99re视频精品| 国产一区91精品张津瑜| 亚洲成人激情自拍| 亚洲日本一区二区三区| 中文字幕精品一区二区精品绿巨人| 欧美系列一区二区| 成人性生交大片免费看视频在线 | 精品国产乱码久久久久久免费| 成人综合婷婷国产精品久久| 日本在线播放一区二区三区| 亚洲视频在线观看一区| 久久精品综合网| 久久亚洲一区二区三区明星换脸| 欧美视频一区二区| 99re这里都是精品| 国产乱国产乱300精品| 激情图区综合网| 天天综合色天天| 一区二区三区在线免费观看| 日本一区二区三区久久久久久久久不| 精品日韩在线观看| 欧美一区二区三区白人| 欧美日韩在线播放一区| 99久久99久久精品免费看蜜桃| 成人av一区二区三区| 国产一区二区在线电影| 91在线丨porny丨国产| 国产一区中文字幕| 国产一区二区三区在线观看免费| 日韩福利视频导航| 亚洲成a人在线观看| 国产精品福利一区二区| 自拍偷拍欧美精品| 国产精品色噜噜| 国产亚洲一二三区| 欧美成人在线直播| 精品国产免费一区二区三区香蕉| 9191国产精品| 欧美人牲a欧美精品| 欧美福利视频一区| 欧美一区二区三区四区视频| 制服丝袜av成人在线看| 91.麻豆视频| 久久综合国产精品| 国产亚洲一区二区三区| 日本一区二区三区国色天香| 国产精品久久久久影院| 国产精品电影一区二区三区| 国产精品嫩草影院com|