Пример #1
0
	def clear(self):
		if not self.colormapinited: raise CallError
		if gl.getdisplaymode() in (GET.DMRGB, GET.DMRGBDOUBLE):
			gl.RGBcolor(200, 200, 200) # XXX rather light grey
			gl.clear()
			return
		gl.writemask(0xffffffff)
		gl.clear()
Пример #2
0
 def clear(self):
     if not self.colormapinited: raise CallError
     if gl.getdisplaymode() in (GET.DMRGB, GET.DMRGBDOUBLE):
         gl.RGBcolor(200, 200, 200)  # XXX rather light grey
         gl.clear()
         return
     gl.writemask(0xffffffff)
     gl.clear()
Пример #3
0
	def clearto(self, r, g, b):
		if not self.colormapinited: raise CallError
		if gl.getdisplaymode() in (GET.DMRGB, GET.DMRGBDOUBLE):
			gl.RGBcolor(r, g, b)
			gl.clear()
			return
		index = self.color0[0]
		self.fixcolor0 = 1
		gl.mapcolor(index, r, g, b)
		gl.writemask(0xffffffff)
		gl.clear()
		gl.gflush()
Пример #4
0
 def clearto(self, r, g, b):
     if not self.colormapinited: raise CallError
     if gl.getdisplaymode() in (GET.DMRGB, GET.DMRGBDOUBLE):
         gl.RGBcolor(r, g, b)
         gl.clear()
         return
     index = self.color0[0]
     self.fixcolor0 = 1
     gl.mapcolor(index, r, g, b)
     gl.writemask(0xffffffff)
     gl.clear()
     gl.gflush()
Пример #5
0
def grab_rgb8(w, h, pf):
	if gl.getdisplaymode() <> GET.DMRGB:
		raise Error, 'Sorry, can only grab rgb8 in single-buf rgbmode'
	if pf <> (1, 1):
		raise Error, 'Sorry, can only grab rgb8 with packfactor (1,1)'
	if not VFile.is_entry_indigo():
		raise Error, 'Sorry, can only grab rgb8 on entry level Indigo'
	# XXX Dirty Dirty here.
	# XXX Set buffer to cmap mode, grab image and set it back.
	gl.cmode()
	gl.gconfig()
	gl.pixmode(GL.PM_SIZE, 8)
	data = gl.lrectread(0, 0, w-1, h-1)
	data = data[:w*h]	# BUG FIX for python lrectread
	gl.RGBmode()
	gl.gconfig()
	gl.pixmode(GL.PM_SIZE, 32)
	return data, None
Пример #6
0
def grab_rgb8(w, h, pf):
    if gl.getdisplaymode() <> GET.DMRGB:
        raise Error, 'Sorry, can only grab rgb8 in single-buf rgbmode'
    if pf <> (1, 1):
        raise Error, 'Sorry, can only grab rgb8 with packfactor (1,1)'
    if not VFile.is_entry_indigo():
        raise Error, 'Sorry, can only grab rgb8 on entry level Indigo'
    # XXX Dirty Dirty here.
    # XXX Set buffer to cmap mode, grab image and set it back.
    gl.cmode()
    gl.gconfig()
    gl.pixmode(GL.PM_SIZE, 8)
    data = gl.lrectread(0, 0, w - 1, h - 1)
    data = data[:w * h]  # BUG FIX for python lrectread
    gl.RGBmode()
    gl.gconfig()
    gl.pixmode(GL.PM_SIZE, 32)
    return data, None
Пример #7
0
def grab_rgb(w, h, pf):
	if gl.getdisplaymode() <> GET.DMRGB:
		raise Error, 'Sorry, can only grab rgb in single-buf rgbmode'
	if pf <> (1, 1):
		raise Error, 'Sorry, only grab rgb with packfactor (1,1)'
	return gl.lrectread(0, 0, w-1, h-1), None
Пример #8
0
def grab_rgb(w, h, pf):
    if gl.getdisplaymode() <> GET.DMRGB:
        raise Error, 'Sorry, can only grab rgb in single-buf rgbmode'
    if pf <> (1, 1):
        raise Error, 'Sorry, only grab rgb with packfactor (1,1)'
    return gl.lrectread(0, 0, w - 1, h - 1), None
Пример #9
0
# Classes to read and write CMIF video files.
Пример #10
0
# Class to grab frames from a window.
Пример #11
0
# Classes to read and write CMIF video files.