Mon Dec 12, 2022 8:12 pm
Tue Dec 13, 2022 3:54 am
delki8 wrote:I'm writing a python plugin that writes some text into my layer and I would really like to select a portion of that text and apply a different formatting to it, like changing the font-size and its color.
I heard a little bit about the concept of parasites, which from my understanding is the metadata associated with my .xcf. When I do this formatting manually I can see this parasite attached to the text as a markup, but I can't find the right way to create a parasite and attach it to my text layer. I've been browsing the "Python Procedure Browser" but this part is a little blurred.
p=gimp.Parasite('some_name',0,some_data)
textLayer.parasite_attach(p)
Thu Dec 15, 2022 5:17 am