Example #1
0
 def testColorcells(self):
     b = vcs.createboxfill()
     x = vcs.init()
     b.colormap = "rainbow"
     x.setcolormap("rainbow")
     self.assertEqual(x.colormap, "rainbow")
     self.assertEqual(x.getcolormapname(), "rainbow")
     self.assertEqual(x.getcolormap().name, "default")
     self.assertEqual(x.getcolorcell(16), [55., 6., 98., 100.])
     self.assertEqual(vcs.getcolorcell(16, x), [55., 6., 98., 100.])
     self.assertEqual(vcs.getcolorcell(16, b), [55, 6., 98., 100.])
     vcs.setcolorcell("rainbow", 16, 100, 100, 100)
     self.assertEqual(x.getcolorcell(16), [100., 100., 100., 100.])
     x.setcolorcell(16, 0, 100, 0)
     self.assertEqual(x.getcolorcell(16), [0., 100., 0., 100.])
     vcs.setcolorcell(b, 16, 100, 100, 100)
     self.assertEqual(x.getcolorcell(16), [100., 100., 100., 100.])
Example #2
0
import vcs

b = vcs.createboxfill()
x = vcs.init()
b.colormap = "rainbow"
x.setcolormap("rainbow")
assert (x.colormap == "rainbow")
assert (x.getcolormapname() == "rainbow")
assert (x.getcolormap().name == "default")
assert (x.getcolorcell(16) == [55, 6, 98])
assert (vcs.getcolorcell(16, x) == [55, 6, 98])
assert (vcs.getcolorcell(16, b) == [55, 6, 98])
vcs.setcolorcell("rainbow", 16, 100, 100, 100)
assert (x.getcolorcell(16) == [100, 100, 100])
x.setcolorcell(16, 0, 100, 0)
assert (x.getcolorcell(16) == [0, 100, 0])
vcs.setcolorcell(b, 16, 100, 100, 100)
assert (x.getcolorcell(16) == [100, 100, 100])
Example #3
0
import vcs

b=vcs.createboxfill()
x=vcs.init()
x.drawlogooff()
b.colormap = "rainbow"
x.setcolormap("rainbow")
assert(x.colormap=="rainbow")
assert(x.getcolormapname()=="rainbow")
assert(x.getcolormap().name=="default")
assert(x.getcolorcell(16)==[55.,6.,98.,100.])
assert(vcs.getcolorcell(16,x)==[55.,6.,98.,100.])
assert(vcs.getcolorcell(16,b)==[55,6.,98.,100.])
vcs.setcolorcell("rainbow",16,100,100,100)
assert(x.getcolorcell(16)==[100.,100.,100.,100.])
x.setcolorcell(16,0,100,0)
assert(x.getcolorcell(16)==[0.,100.,0.,100.])
vcs.setcolorcell(b,16,100,100,100)
assert(x.getcolorcell(16)==[100.,100.,100.,100.])
Example #4
0
import vcs

b=vcs.createboxfill()
x=vcs.init()
x.drawlogooff()
b.colormap = "rainbow"
x.setcolormap("rainbow")
assert(x.colormap=="rainbow")
assert(x.getcolormapname()=="rainbow")
assert(x.getcolormap().name=="default")
assert(x.getcolorcell(16)==[55,6,98])
assert(vcs.getcolorcell(16,x)==[55,6,98])
assert(vcs.getcolorcell(16,b)==[55,6,98])
vcs.setcolorcell("rainbow",16,100,100,100)
assert(x.getcolorcell(16)==[100,100,100])
x.setcolorcell(16,0,100,0)
assert(x.getcolorcell(16)==[0,100,0])
vcs.setcolorcell(b,16,100,100,100)
assert(x.getcolorcell(16)==[100,100,100])
Example #5
0
import vcs

b = vcs.createboxfill()
x = vcs.init()
x.drawlogooff()
b.colormap = "rainbow"
x.setcolormap("rainbow")
assert (x.colormap == "rainbow")
assert (x.getcolormapname() == "rainbow")
assert (x.getcolormap().name == "default")
assert (x.getcolorcell(16) == [55., 6., 98., 100.])
assert (vcs.getcolorcell(16, x) == [55., 6., 98., 100.])
assert (vcs.getcolorcell(16, b) == [55, 6., 98., 100.])
vcs.setcolorcell("rainbow", 16, 100, 100, 100)
assert (x.getcolorcell(16) == [100., 100., 100., 100.])
x.setcolorcell(16, 0, 100, 0)
assert (x.getcolorcell(16) == [0., 100., 0., 100.])
vcs.setcolorcell(b, 16, 100, 100, 100)
assert (x.getcolorcell(16) == [100., 100., 100., 100.])