Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gimp 3.0.6 Python plug-in bug with text layer.set_color(color)?
#6
My problem is solved.

I had a closer look at my Gimp 2 plug-in and indeed found that I had set the color after inserting the layer. I'm sorry to have overlooked this.

Interesting that to set the name with "textLayer.set_name("My Text")" works before or after inserting the layer.

The working code:
Code:
textColor = Gegl.Color.new("red") # e.g.
textLayer = Gimp.TextLayer.new(image, "Text", someFont, sometextSize, Gimp.Unit.pixel())
image.insert_layer(textLayer, parent, position)
textLayer.set_name("Text")
textLayer.set_color(textColor)
Reply


Messages In This Thread
RE: Gimp 3.0.6 Python plug-in bug with text layer.set_color(color)? [Solved] - by Volker - 11-20-2025, 08:36 AM

Forum Jump: