How do I add a text annotation with python in dm-script (Edit ... in Version 3.4.0)?
I want to add some text to images by using python in the GMS python environment. Therefore I want to use text annotations.
I can create a text annotation by using DM.NewTextAnnotation(). But the returned DM.Py_Component object does not have any ComponentAddChild...() methods. So I can create text annotations but I cannot add them.
There also is a DM.Py_Component.AddNewComponent(type, f1, f2, f3, f4) method. I can create text annotations with that (using type = 13). But I can only specify the position with the parameters f1 to f4. Using a string argument raises a TypeError. There is a DM.Py_Component.GetText() and several font manipulation methods but no DM.Py_Component.SetText(). So I can create text annotations which are already appended to the parent component but without text. And I cannot set the text.
The dm-script docs also talk about a Component::ComponentExternalizeProperties() which lets me assume that there is a TagGroup in the background of each component. Is there any way to manipulate that, even though there is no DM.Py_Component.ExternalizeProperties() in the python module.
So my question is: What is the intended way of adding text annotations to images? Is there any way of either adding annotations to components or setting the text of an added annotation?