@shellex说: wine 的程序一直检测不到网络地址...
  • Pages

  • Topics

  • 随便看看

  • 路边社评论员

    • echo:
      哇哦~!! 漫画家路线! »
    • alswl:
      大哥的Naja~~~捂嘴飘过 »
    • zac:
      站内链接总是打开新标签页,烦,跳来跳去的 »
    • susankid:
      @susankid @Shellexy 上一条回复按错了人了我自重= =话说你们两只的名字为什么这么... »
    • susankid:
      @Shellexy 啊~乃真的是女生么。。。有一点点震惊。@@ »
    • ye:
      if anyone know how to get the chromium for linux o... »
    • 拉拉:
      嗯你是个瘦子。 »
    • badboy:
      大哥你的NAJA插件现在在RENREN淫淫网用不鸟了能不能更新一下啊,先谢过了另外最好能让自己改参数... »
    • stranger:
      哇靠,为神马我的那么平淡。。。 »
    • Shellexy:
      @abettor 你居然不知到壳壳猫就是 mm? 要让 @玛格丽特苏 教育下你~ »
    • abettor:
      @Thruth 不了解的,还以为是MM呢! »
    • Jasey_wang:
      你的手狠PL。。。 »

Posts Tagged ‘cairo’

自己做一个cairo clock

由于手头工作的原因,我要接触cairo这个矢量图形库,因为它的免费高效跨平台。如果你现在使用的Firefox 3浏览器,那么恭喜你,Cairo正在为你工作。当然了,GTK和Gnome这样的项目也采用了Cairo。
Cairo:http://www.cairographics.org/
下面的内容你可能需要一些GTK和python的前置知识。还有Cairo本身.

import gtk
import pygtk
import cairo
import math
import time
import gobject

class Clock(gtk.DrawingArea):
def progress_timeout(self, object):
width, height = self.get_parent().size_request()
#Adds region to the update area for window
object.window.invalidate_rect((0, 0, width, height), False)
return True

def __init__(self):
gtk.DrawingArea.__init__(self)
self.connect(“expose_event”, self.expose_cb)
self.timer = gobject.timeout_add (300, self.progress_timeout, self)

def expose_cb(self, widget, event):
self.context = widget.window.cairo_create()
# set a clip region for the expose event
self.context.rectangle(event.area.x, event.area.y,
[...]

Page 1 of 11