# 需要导入模块: from gi.repository import Gdk [as 别名]# 或者: from gi.repository.Gdk importcairo_set_source_rgba[as 别名]defdraw_cb(self, widget, cairo_ctx):style = widget.get_style_context() bg_color = style.get_background_color(0) Gdk.cairo_set_source_rgba(cairo_ctx, bg_color)...
// 返回值:voidvoiddraw_main(GtkWidget * widget){cairo_t* cr = gdk_cairo_create(widget->window);gdk_cairo_set_source_pixbuf(cr,background,0,0); cairo_paint(cr); cairo_fill (cr);for(inti=0;i<N;i++) {for(intj=0;j<N;j++) {if(chess_board[i*N+j]==1) {gdk_cairo_set_sour...
* This is again kinda ugly. Draw once from each side, clipping away the other. */cairo_set_source_rgba(cr, colors->spot[0].r, colors->spot[0].g, colors->spot[0].b,0.3);/* left side */cairo_save (cr); cairo_rectangle (cr,0,0, width /2, height); cairo_clip (cr);if(p...
context.SetSourceRGBA(0,0,0, fill ?0.5:0.3); context.FillPreserve (); context.NewPath (); context.Restore (); } 开发者ID:Teyras,项目名称:Bounce,代码行数:11,代码来源:BoardRenderer.cs 示例5: DrawCloseButton ▲点赞 1▼ staticvoidDrawCloseButton(Cairo.Context context, Gdk.Point center,boo...
示例1: cairo_draw ▲点赞 7▼ # 需要导入模块: from gi.repository import Clutter [as 别名]# 或者: from gi.repository.Clutter importcairo_set_source_color[as 别名]defcairo_draw(canvas, cr):# Rather than using GTimeDate (which I couldn't find), we'll use Python time.t = time.localtim...
Gdk.cairo_set_source_pixbuf(ctx, self.iter.get_pixbuf(),0,0) ctx.paint()exceptcairo.Error: logger.error(_('Cairo can not draw gif'), exc_info =True) 開發者ID:Cimbali,項目名稱:pympress,代碼行數:14,代碼來源:gif_backend.py 示例3: render_pointer ...
以下是Cairo.Context类Cairo.Context.SetSource方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为感觉有用的代码点赞,您的评价将有助于系统推荐出更好的C#代码示例。 示例1: OnMouseUp ▲点赞 6▼ protectedoverridevoidOnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD poi...
Gdk.cairo_set_source_window(ctx, window, tv_alloc.x, tv_alloc.y) ctx.paint() widget.activity.textview.hide() widget.drawing_canvas.flush() textview.get_buffer().set_text('') widget.enable_undo() widget.queue_draw() 开发者ID:quozl,项目名称:paint-activity,代码行数:32,代码来源:Desenho...
e.SetSource(pat); e.FillPreserve(); e.Stroke(); } 开发者ID:mhusen,项目名称:Eto,代码行数:11,代码来源:AnalogClock.cs 示例4: DrawColumnHighlight ▲点赞 2▼ publicvoidDrawColumnHighlight(Cairo.Context cr, Gdk.Rectangle alloc, Cairo.Color color){ ...
cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);gdk_cairo_set_source_color(cr, &white); cairo_rectangle (cr,0,0, allocation.width, allocation.height); cairo_fill_preserve (cr);gdk_cairo_set_source_color(cr, &black); cairo_stroke (cr); ...