Loading...
 

Demo


Clementine

Gimp

Gimpfilter

Drawcircle

Result1drawcircle

Result2drawcircle

 

Informations

 

Use

  • Allow to add numbered bullets in Gimp
  • Each bullet is a layer you can move with move tool from Too Windo ( CTRL+B)
  • You can use filter merge and quit to merge allthe layers save the file and quit gimp

Caractéristiques

 

  • Scheme written  ( no need python nor perl)
  • Run on Gimp Window, Linux, MacOSX
  • You can control
  1. Bullet colo
  2. Text color
  3. Start and end number ( 1 to 99)
  4. The font
  5. Size of bullet in pixel

Source :

;;; Gilles Maire 
;;; GPL v3
;;; gilles@gillesmaire.com
;;; http://www.gillesmaire.com
;;; Draws circles with incremental mnumber inside
;;; version 1.1



(define (draw-numbers image layer n1 n2 colb colf font diam)
	(let* ((i 0) 
	       (j 0)
	       (letter "x") 
	       (x 0) 
               (fontsize ( * diam 0.6))
	       (y (/ fontsize  3.5))
	       (layer 0)
	       (len car(string-length(number->string n2))) 
	       (select-layer 0) (layername "Layer") 
	       (y0 0) 
	       (H (- (car(gimp-image-height image)) diam))
	      )
		   (do ((i n1 (+ i 1)))
			((> i n2))
				(if (= (string-length (number->string i))  2)  (set! x (/ fontsize 4.2)) (set! x (/ fontsize 2.0)))
				(set! y0 (+ y0  diam diam))
				(if (> y0  H) (set! y0 0))
				(set! j (- i 1))
				(set! letter (number->string i))
				(set! layername ( string-append "Layer_" letter))
			    (set! layer (car(gimp-layer-new image diam diam RGBA-IMAGE layername 100 NORMAL-MODE)))
				(gimp-image-insert-layer image layer 0 j)
				(gimp-image-select-ellipse image CHANNEL-OP-ADD 0 0 diam diam)
				(gimp-context-set-foreground colb)
				(gimp-edit-bucket-fill layer FG-BUCKET-FILL  NORMAL-MODE  100  100  0  10 10)
				(gimp-context-set-foreground colf)
				(set! select-layer (car(gimp-text-fontname image layer x y letter 0 TRUE fontsize PIXELS font)))
				(gimp-floating-sel-anchor select-layer)   
				(gimp-layer-translate layer 0 y0)
		   )
		   (gimp-displays-flush)
	)
)

(define (merge-and-export image drawable)
 (let* ((layer (car(gimp-image-merge-visible-layers image CLIP-TO-IMAGE)))(filename "/tmp/save.png"))
		(set! filename (car(gimp-image-get-filename image)))
        (gimp-file-save RUN-NONINTERACTIVE image layer filename filename)
        (gimp-quit TRUE)
 )
)
   
(script-fu-register "draw-numbers"
                    _"<Image>/Filters/Decor/DrawNumber/DrawNumbers"
                    "Make circle numbers"
                    "Gilles Maire "
                    "GPL3 2015"
                    "2015/12/09"
                    ""
                    SF-IMAGE "image" 0
                    SF-DRAWABLE "drawable" 0
                    SF-ADJUSTMENT "Minimum" '(1 1 99 1 10 0 SF-SPINNER)
                    SF-ADJUSTMENT "Maximum" '(5 1 99 1 10 0 SF-S)
                    SF-COLOR "Background" '(100 100 100 ) 
                    SF-COLOR "Foreground" '(255 255 255 ) 
                    SF-FONT "Font" "Sans"
                    SF-ADJUSTMENT "Size" '(25 10 80 1 10 0 SF-SPINNER)
                    
)

(script-fu-register "merge-and-export"
                    _"<Image>/Filters/Decor/DrawNumber/merge and quit"
                    "Merge and quit"
                    "Gilles Maire "
                    "GPL3 2015"
                    "2016/12/09"
                    ""
                    SF-IMAGE "image" 0
                    SF-DRAWABLE "drawable" 0
)


 

Installation


- copy file in .gimp-2.8/scripts
- name it draw-numbers.scm
- you will find it inside gimp in menu Filters/Decor/DrawNumber

Switch Language

EnglishFrançais

Recherche