def test_get_compiled_path(self): path = CompiledPath() path.begin_path() path.move_to(-5, -5) path.line_to(-5, 5) path.line_to(5, 5) path.line_to(5, -5) path.line_to(-5, -5) marker = CustomMarker(path=path) # should not fail marker.get_compiled_path(np.int64(0))
def test_add_to_path(self): path = CompiledPath() path.begin_path() path.move_to(-5, -5) path.line_to(-5, 5) path.line_to(5, 5) path.line_to(5, -5) path.line_to(-5, -5) marker = CustomMarker(path=path) gc = GraphicsContext((50, 50)) # should not fail marker.add_to_path(gc.get_empty_path(), np.int64(0))
def test_scatter_custom(self): """ Coverage test to check custom markers work... XXX ...which apparently they currently don't. See #232. """ # build path path = CompiledPath() path.begin_path() path.move_to(-5, -5) path.line_to(-5, 5) path.line_to(5, 5) path.line_to(5, -5) path.line_to(-5, -5) self.scatterplot.marker = 'custom' self.scatterplot.custom_symbol = path self.gc.render_component(self.scatterplot) actual = self.gc.bmp_array[:, :, :] self.assertFalse(alltrue(actual == 255))