This file is indexed.

/usr/share/gimp/2.0/scripts/goode-rule-of-thirds-grid.scm is in gimp-plugin-registry 5.20120621ubuntu3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
;
; The GIMP -- an image manipulation program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
;
; Rule of Thirds Grid script  for GIMP 2.4
; Copyright (C) 2007 Saul Goode
;
; Tags: tool, preset grid
;
; Author statement:
;
;
; --------------------------------------------------------------------
; Distributed by Gimp FX Foundry project
; --------------------------------------------------------------------
;   - Changelog -
;
; --------------------------------------------------------------------
;
;    This program is free software: you can redistribute it and/or modify
;    it under the terms of the GNU General Public License as published by
;    the Free Software Foundation, either version 3 of the License, or
;    (at your option) any later version.
;
;    This program is distributed in the hope that it will be useful,
;    but WITHOUT ANY WARRANTY; without even the implied warranty of
;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;    GNU General Public License for more details.
;
;    You should have received a copy of the GNU General Public License
;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(define (script-fu-thirds-rule-grid image drawable color line-width image-derived?)

  (let* ((width (if (= image-derived? TRUE)
                       (car (gimp-image-width image))
                       (car (gimp-drawable-width drawable))))
         (height (if (= image-derived? TRUE)
                        (car (gimp-image-height image))
                        (car (gimp-drawable-height drawable))))
         (offset-x (if (= image-derived? TRUE)
                          0
                          (car  (gimp-drawable-offsets drawable))))
         (offset-y (if (= image-derived? TRUE)
                          0
                          (cadr (gimp-drawable-offsets drawable))))
         (w1/3 (trunc (- (+ (/ width        3) 0.5) (/ line-width 2))))
         (h1/3 (trunc (- (+ (/ height       3) 0.5) (/ line-width 2))))
         (w2/3 (trunc (- (+ (/ (* width 2)  3) 0.5) (/ line-width 2))))
         (h2/3 (trunc (- (+ (/ (* height 2) 3) 0.5) (/ line-width 2))))
         (orig-color (car (gimp-context-get-foreground)))
         (orig-select)
         (layer)
         )
    (gimp-image-undo-group-start image)
    (gimp-context-set-foreground color)
    (set! orig-select (car (gimp-selection-save image)))
    (set! layer (car (gimp-layer-new image width height
                                     (car (gimp-drawable-type-with-alpha drawable))
                                     _"Grid"
                                     100
                                     NORMAL)))
    (gimp-drawable-fill layer TRANSPARENT-FILL)
    (gimp-image-add-layer image layer -1)
    (gimp-selection-none image)
    (gimp-rect-select image w1/3 0    line-width height     CHANNEL-OP-ADD FALSE 0)
    (gimp-rect-select image 0    h1/3 width      line-width CHANNEL-OP-ADD FALSE 0)
    (gimp-rect-select image w2/3 0    line-width height     CHANNEL-OP-ADD FALSE 0)
    (gimp-rect-select image 0    h2/3 width      line-width CHANNEL-OP-ADD FALSE 0)
    (gimp-edit-fill layer FOREGROUND-FILL)
    (gimp-layer-translate layer offset-x offset-y)
    (gimp-selection-load orig-select)
    (gimp-image-remove-channel image orig-select)
    (gimp-context-set-foreground orig-color)
    (gimp-image-undo-group-end image)
    (gimp-displays-flush)
    )
  )


(script-fu-register "script-fu-thirds-rule-grid"
                    _"Rule Of Thirds Grid"
                    _"Generate a New Layer with a Rule Of Thirds Grid"
                    "Saul Goode"
                    "Saul Goode"
                    "2007/11/1"
                    "RGB* GRAY*"
                    SF-IMAGE       "Image"           0
                    SF-DRAWABLE    "Drawable"        0
                    SF-COLOR       _"Ruler Color"     '(0 0 0)
                    SF-ADJUSTMENT  _"Ruler Size"      '(2 1 50 1 10 0 1)
                    SF-TOGGLE      _"Image based?"    FALSE
                    )

(script-fu-menu-register "script-fu-thirds-rule-grid"
             "<Image>/FX-Foundry/Toolbox/Grids/")