Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gimp 3.0 - How to draw stuff with python scripts (pixel by pixel)
#2

.scm   draw-circle.scm (Size: 2.2 KB / Downloads: 10)
.scm   draw-hollow-circle.scm (Size: 2.09 KB / Downloads: 9)
(03-04-2026, 05:15 PM)krokots Wrote: I see that Drawable class have a method SetPixel, but in the docs it says that undo doesn't work on that. So, how to modify drawable pixels so that undo works ?

The attached scripts are in Script-fu but would be easily convertible to Python - they draw a filled circle and a hollow circle by filling or stroking a selection (an ellipse with the foci at the same position. For drawing other shapes it would probably be best to define paths and then stroke them. Alternatively define a selection and stroke that. Avoid using set_pixel()
Reply


Messages In This Thread
RE: Gimp 3.0 - How to draw stuff with python scripts (pixel by pixel) - by programmer_ceds - 03-05-2026, 12:49 PM

Forum Jump: