示例#1
0
    def test_buffer(self):
      rgb_float = Gegl.format("RGB float")
      rgba_u8 = Gegl.format("RGBA u8")

      buf_float = Gegl.Buffer(format=rgb_float)
      buf_u8 = Gegl.Buffer(format=rgba_u8)

      self.assertEqual("RGB float", Gegl.format_get_name(buf_float.get_property("format")))
      self.assertEqual("RGBA u8", Gegl.format_get_name(buf_u8.get_property("format")))
示例#2
0
    def test_format(self):
      rgb_float = Gegl.format("RGB float")
      rgba_u8 = Gegl.format("RGBA u8")

      # Just ensure these don't crash
      str(rgb_float)
      repr(rgb_float)

      self.assertEqual("RGB float", Gegl.format_get_name(rgb_float))
      self.assertEqual("RGBA u8", Gegl.format_get_name(rgba_u8))
示例#3
0
    def test_format(self):
        rgb_float = Gegl.format("RGB float")
        rgba_u8 = Gegl.format("RGBA u8")

        # Just ensure these don't crash
        str(rgb_float)
        repr(rgb_float)

        self.assertEqual("RGB float", Gegl.format_get_name(rgb_float))
        self.assertEqual("RGBA u8", Gegl.format_get_name(rgba_u8))
示例#4
0
    def test_color_op(self):
      node = Gegl.Node()
      node.set_property("operation", "gegl:color")

      node.set_property("format", Gegl.format("RGBA u8"))
      self.assertEqual(Gegl.format("RGBA u8"), node.get_property("format"))
      self.assertEqual("RGBA u8", Gegl.format_get_name(node.get_property("format")))

      node.set_property("format", Gegl.format("RGBA float"))
      self.assertEqual(Gegl.format("RGBA float"), node.get_property("format"))
      self.assertEqual("RGBA float", Gegl.format_get_name(node.get_property("format")))
示例#5
0
    def test_color_op(self):
      node = Gegl.Node()
      node.set_property("operation", "gegl:color")

      node.set_property("format", Gegl.format("RGBA u8"))
      self.assertEqual(Gegl.format("RGBA u8"), node.get_property("format"))
      self.assertEqual("RGBA u8", Gegl.format_get_name(node.get_property("format")))

      node.set_property("format", Gegl.format("RGBA float"))
      self.assertEqual(Gegl.format("RGBA float"), node.get_property("format"))
      self.assertEqual("RGBA float", Gegl.format_get_name(node.get_property("format")))
示例#6
0
    def test_buffer(self):
        rgb_float = Gegl.format("RGB float")
        rgba_u8 = Gegl.format("RGBA u8")

        buf_float = Gegl.Buffer(format=rgb_float)
        buf_u8 = Gegl.Buffer(format=rgba_u8)

        self.assertEqual(
            "RGB float",
            Gegl.format_get_name(buf_float.get_property("format")))
        self.assertEqual("RGBA u8",
                         Gegl.format_get_name(buf_u8.get_property("format")))
示例#7
0
    def test_buffer(self):
      print("SKIPPED! This test is known to be broken in gi version >=3.14.0")
      print("https://gitlab.gnome.org/GNOME/pygobject/issues/93")
      return 0
      # buf_float.get_property("format") returns an integer,
      # not gobject pointer to the format as it should

      rgb_float = Gegl.format("RGB float")
      rgba_u8 = Gegl.format("RGBA u8")

      buf_float = Gegl.Buffer(format=rgb_float)
      buf_u8 = Gegl.Buffer(format=rgba_u8)

      self.assertEqual("RGB float", Gegl.format_get_name(buf_float.get_property("format")))
      self.assertEqual("RGBA u8", Gegl.format_get_name(buf_u8.get_property("format")))
示例#8
0
    def test_buffer(self):
      if gi.__version__ in ("3.14.0"):
        print "SKIPPED! This test is known to be broken in gi version 3.14.0"
        print "https://bugzilla.gnome.org/show_bug.cgi?id=741291"
        # This gi version is known to be broken.
        # buf_float.get_property("format") returns an integer,
        # not gobject pointer to the format as it should
        return

      rgb_float = Gegl.format("RGB float")
      rgba_u8 = Gegl.format("RGBA u8")

      buf_float = Gegl.Buffer(format=rgb_float)
      buf_u8 = Gegl.Buffer(format=rgba_u8)

      self.assertEqual("RGB float", Gegl.format_get_name(buf_float.get_property("format")))
      self.assertEqual("RGBA u8", Gegl.format_get_name(buf_u8.get_property("format")))