Here is the code to draw a single pixel line, black on white, on the
drawable "layer" and x1 y1 are one end and x2 y2 are the other.

    (gimp-context-set-brush "Circle (01)")
    (gimp-context-set-foreground "Black")
    (gimp-context-set-background "White")
    (gimp-context-set-opacity 100)
    (gimp-context-set-paint-mode NORMAL-MODE)
    (gimp-pencil layer 4 (vector x1 y1 x2 x2))

0,0 is upper left hand side.  This is with the pencil tool.  Replace
with any other tool as desired, for example:
    (gimp-paintbrush-default layer 4 (vector x1 y1 x2 y2))

Hope that helps,

-Rob A>
Gimp-developer mailing list

Reply via email to