/** * Creates a new transform from name, the plugin will be loaded but won't be realized. * * @param transformname * The name of the plugin to load, or NULL to simply allocate a new * transform. * * @return A newly allocated VisTransform, optionally containing a loaded plugin. Or NULL on failure. */ VisTransform *visual_transform_new (const char *transformname) { VisTransform *transform; transform = visual_mem_new0 (VisTransform, 1); visual_transform_init (transform, transformname); /* Do the VisObject initialization */ visual_object_set_allocated (VISUAL_OBJECT (transform), TRUE); visual_object_ref (VISUAL_OBJECT (transform)); return transform; }
VisTransform *visual_transform_new (const char *transformname) { VisTransform *transform; int result; transform = visual_mem_new0 (VisTransform, 1); result = visual_transform_init (transform, transformname); if (result != VISUAL_OK) { visual_mem_free (transform); return NULL; } /* Do the VisObject initialization */ visual_object_set_allocated (VISUAL_OBJECT (transform), TRUE); visual_object_ref (VISUAL_OBJECT (transform)); return transform; }