{"id":445935,"date":"2025-01-23T15:01:06","date_gmt":"2025-01-23T15:01:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=445935"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=445935","title":{"rendered":"<span>GIMP Script-Fu \u041f\u0435\u0440\u0432\u044b\u0439 \u0414\u0430\u043d. \u0424\u0438\u0433\u0443\u0440\u044b<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><a href=\"https:\/\/gitflic.ru\/project\/nuinu\/gimp-script-fu-ext\" rel=\"noopener noreferrer nofollow\">\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043a Script-fu<\/a><\/p>\n<p>\u041c\u044b \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043a\u043e\u043d\u0442\u0443\u0440\u044b, \u0434\u043b\u044f \u0432\u044b\u0447\u0435\u0440\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u0440\u0438\u0432\u044b\u0445 \u043b\u0438\u043d\u0438\u0439, \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0439, \u0434\u043b\u044f \u0437\u0430\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041d\u043e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f \u043a\u043e\u043d\u0442\u0443\u0440\u0430 \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u0438(\u0442\u043e\u0447\u043a\u0438), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0441\u0432\u043e\u0435\u043c\u0443 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044e. \u041f\u043e\u0440\u0430 \u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044e \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0443\u0440\u0430, \u043a\u0438\u0441\u0442\u044c, \u0446\u0432\u0435\u0442, \u0438 \u0442\u0438\u043f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0431\u0443\u0434\u044c \u044d\u0442\u043e \u0444\u0438\u0433\u0443\u0440\u0430 \u0438\u043b\u0438 \u0433\u043e\u043b\u044b\u0439 \u043a\u043e\u043d\u0442\u0443\u0440. \u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443\u044f\u0441\u044c \u044d\u0442\u0438\u043c\u0438 \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u0438 \u043e\u043a\u0440\u0443\u0436\u0438\u043b \u0435\u0451 \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0441\u043e\u0437\u0434\u0430\u044e\u0449\u0438\u0445 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044e \u0444\u0438\u0433\u0443\u0440\u044b.<\/p>\n<pre><code class=\"lisp\">;;\u0444\u0438\u0433\u0443\u0440\u0430 \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0443\u0440, \u0441\u043e\u0435\u0434\u0438\u043d\u0451\u043d\u043d\u044b\u0439 \u0441 \u0446\u0432\u0435\u0442\u043e\u043c \u0438 \u043a\u0438\u0441\u0442\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044d\u0442\u043e\u0442 \u043a\u043e\u043d\u0442\u0443\u0440 \u043d\u0430\u0434\u043e \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c. ;;\u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0433\u0430\u0431\u0430\u0440\u0438\u0442\u043e\u0432 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 ;;\u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c. \u043f\u0440\u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f\u0445 \u044d\u0442\u043e \u043d\u0430\u0434\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c. ;;========================================================================================== (struct fig (name type color brush contour min-x min-y max-x max-y)) ;;========================================================================================== <\/code><\/pre>\n<p>\u041d\u0430\u0431\u043e\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441\u043e\u0437\u0434\u0430\u044e\u0449\u0438\u0445 \u0444\u0438\u0433\u0443\u0440\u044b:<\/p>\n<pre><code class=\"lisp\">(define default-color '(127 127 127)) (define default-brush (make-brush2 \"Circle (05)\"))  ;; \u044d\u0442\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043d\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c (define (make-fig contour type name color brush)   (let ((min-p (min-pos contour))         (max-p (max-pos contour)))      (fig! name type color brush            contour            (p-x min-p) (p-y min-p)            (p-x max-p) (p-y max-p))))  ;;\u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u0444\u0438\u0433\u0443\u0440\u0443-\u043a\u043e\u043d\u0442\u0443\u0440 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u0446\u0432\u0435\u0442\u043e\u043c \u0438 \u043a\u0438\u0441\u0442\u044c\u044e (defun (make-brush-fig contour &amp;key :name :color :brush)   (make-fig contour 'brush name             (if (not color)                 default-color                 color)             (if (not brush)                 default-brush                 brush)))                  ;;\u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0444\u0438\u0433\u0443\u0440\u0443 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u0443\u044e \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c. (defun (make-shape-fig contour &amp;key :name :color :brush)    (make-fig contour 'shape name              (if (not color)                  default-color                  color)              (if (not brush)                  default-brush                  brush)))  ;;\u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0444\u0438\u0433\u0443\u0440\u0443 \u043a\u043e\u043d\u0442\u0443\u0440 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u043a\u0430\u0440\u0430\u043d\u0434\u0430\u0448\u043e\u043c -  p\u0435ncil (defun (make-pencil-fig contour &amp;key :name :color :brush)    (make-fig contour 'pencil name              (if (not color)                  default-color                  color)              (if (not brush)                  default-brush                  brush))) <\/code><\/pre>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0444\u0438\u0433\u0443\u0440\u044b \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0443\u0440\u043e\u0432, \u0442.\u0435 \u0438\u0445 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f: \u043a\u043e\u043d\u0442\u0443\u0440, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u0438\u0441\u0442\u0438, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u0430\u0440\u0430\u043d\u0434\u0430\u0448\u0430 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c.<\/p>\n<pre><code class=\"lisp\">;;\u0432\u044b\u043d\u0435\u0441\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0442\u043e\u0447\u0435\u043a \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e (define (make-contour-vector contour num-points)    (let ((points     (make-vector (* 2 num-points) 'double))          (i   0)          (cur contour))       (while (&amp;lt; i num-points)          (vector-set! points (* 2 i)       (p-x (car cur)))          (vector-set! points (+ (* 2 i) 1) (p-y (car cur)))          (set! i   (+ i 1))          (set! cur (cdr cur)))       points))  ;;\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0444\u0438\u0433\u0443\u0440\u044b fig \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 img \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 tr (define (draw-fig img fig tr)    (let* ((contour    (if tr                           (translate-contour (fig-contour fig) tr)                           (fig-contour fig)))           (num-points (length contour))           (points     (make-contour-vector contour  num-points))           (dw         (car (gimp-image-get-active-drawable img))))       ;;(gimp-context-push)       (gimp-context-set-foreground (fig-color fig))       (cond        ((eq? (fig-type fig) 'pencil)         ((fig-brush fig))         (gimp-pencil  dw (* 2  num-points) points)        ((eq? (fig-type fig) 'brush)         ((fig-brush fig))         (gimp-paintbrush-default  dw (* 2  num-points) points))        ((eq? (fig-type fig) 'shape)         ;;(gimp-image-select-polygon  img CHANNEL-OP-REPLACE num-points points)         (gimp-free-select  img (- (* 2  num-points) 1) points  CHANNEL-OP-REPLACE 0 0 0)         (gimp-edit-fill dw  FOREGROUND-FILL)         (gimp-selection-none img))        )       ;;(gimp-context-pop)   )) <\/code><\/pre>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442-\u0444\u0443 \u043a \u0440\u0430\u0431\u043e\u0442\u0435, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u0434\u043b\u044f 2.10<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"lisp\">(define path-home (getenv \"HOME\")) (define path-lib (string-append path-home \"\/work\/gimp\/lib\/\")) (define path-work (string-append path-home \"\/work\/gimp\/\")) (load (string-append path-lib \"util.scm\")) (load (string-append path-lib \"defun.scm\")) (load (string-append path-lib \"struct.scm\")) (load (string-append path-lib \"point.scm\")) (load (string-append path-lib \"tr2d.scm\")) (load (string-append path-lib \"contour.scm\")) (load (string-append path-lib \"img.scm\")) (load (string-append path-lib \"rect.scm\")) (load (string-append path-lib \"vect.scm\")) (load (string-append path-lib \"brush.scm\")) (load (string-append path-lib \"fig.scm\"))<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0434\u043b\u044f 2.6<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"lisp\">(define path-home \"D:\") ;;\u0434\u043b\u044f \u0432\u0438\u043d\u0434\u043e\u0432\u0441 ;;(define path-home (getenv \"HOME\")) (define path-lib (string-append path-home \"\/work\/gimp\/lib\/\")) (define path-work (string-append path-home \"\/work\/gimp\/\")) (load (string-append path-lib \"util.scm\")) (load (string-append path-lib \"defun.scm\")) (load (string-append path-lib \"struct.scm\")) (load (string-append path-lib \"point.scm\")) (load (string-append path-lib \"tr2d.scm\")) (load (string-append path-lib \"contour.scm\")) (load (string-append path-lib \"img2.6.scm\")) (load (string-append path-lib \"rect.scm\")) (load (string-append path-lib \"vect.scm\")) (load (string-append path-lib \"brush-2.6.scm\")) (load (string-append path-lib \"fig2.6.scm\"))<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0442\u0435\u0441\u0442, \u043d\u0430 \u0434\u0432\u0443\u0445 \u0444\u0438\u0433\u0443\u0440\u0430\u0445<\/p>\n<pre><code class=\"lisp\">(define i1 (create-1-layer-img 640 480)) ;;\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u043f\u043e\u043b\u043e\u0442\u043d\u043e \u0434\u043b\u044f \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f.  (define c1 (make-circle-n 50 50 50 10)) (define f1 (make-brush-fig c1 :name 'circle1)) (define f2 (make-pencil-fig c1 :name 'circle2 :color '(255 255 255))) ;;(define f2 (make-pencil-fig c1 :name 'circle2 :color '(0 255 255))) (define tr3       (comb-tr2d                    (make-tr2d-scale 2 1.5)                    (make-tr2d-shear-y 15)                    (make-tr2d-rot -90)                    (make-tr2d-move 100 300)))  (draw-fig i1 f1 #f) (draw-fig i1 f2 tr3)<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/46f\/f83\/e2f\/46ff83e2f0a1b5249c0f0d5560137904.png\" alt=\"&quot;\u0420\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0438\u0433\u0443\u0440&quot;\" width=\"280\" height=\"337\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/46f\/f83\/e2f\/46ff83e2f0a1b5249c0f0d5560137904.png\"\/><\/p>\n<div><figcaption>&#171;\u0420\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0438\u0433\u0443\u0440&#187;<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0438\u0441\u0443\u0435\u043c \u0444\u0438\u0433\u0443\u0440\u0443 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u0443\u044e \u0446\u0432\u0435\u0442\u043e\u043c<\/p>\n<pre><code class=\"lisp\">(define f3 (make-shape-fig c1 :name 'circle2 :color '(255 255 0))) (define tr4       (comb-tr2d                    (make-tr2d-scale 1.5 1.5)                    (make-tr2d-shear-y 0)                    (make-tr2d-rot 30)                    (make-tr2d-move 350 50))) (draw-fig i1 f3 tr4)  (define tr5       (comb-tr2d                    (make-tr2d-scale 1. 1.)                    (make-tr2d-shear-x 20)                    (make-tr2d-rot 0)                    (make-tr2d-move 90 100))) (draw-fig i1 f3 tr5)<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5e7\/95f\/325\/5e795f325193853fa4f42af84bf14555.png\" alt=\"&quot;\u0420\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0438\u0433\u0443\u0440 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u043c&quot;\" width=\"492\" height=\"204\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5e7\/95f\/325\/5e795f325193853fa4f42af84bf14555.png\"\/><\/p>\n<div><figcaption>&#171;\u0420\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0438\u0433\u0443\u0440 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u043c&#187;<\/figcaption><\/div>\n<\/figure>\n<p>\u0420\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0443\u0440\u0430, \u0447\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0431\u0435\u0434\u043d\u044f\u0435\u0442 \u043d\u0430\u0448\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439. \u0410 \u0432\u043e\u0442 \u0435\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0444\u0438\u0433\u0443\u0440\u044b \u0432 \u0441\u043f\u0438\u0441\u043e\u043a, \u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044e. \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0449\u0443\u044e \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443. \u041f\u0440\u0438\u0447\u0451\u043c \u0434\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043d\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e tr2d, \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0430 \u0440\u0430\u043c\u043a\u0443(frame), \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d\u0430 \u0441\u0430\u043c\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043a\u043e \u0432\u0441\u0435\u043c \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0432 \u043d\u0435\u0451 \u0444\u0438\u0433\u0443\u0440\u0430\u043c.<\/p>\n<pre><code class=\"lisp\">(define (draw-figs img list-fig r)    (let* ((delta      0.00001)           (p-min      (min-pos-figs list-fig))           (p-max      (max-pos-figs list-fig))           (tr         (make-tr2d-from-rect r                                            (- (p-x p-max) (p-x p-min))                                            (- (p-y p-max) (p-y p-min))))           (dw         (car (gimp-image-get-active-drawable img))))       ;;(gimp-context-push)       (if (or (&amp;gt; (abs (p-x p-min)) delta)               (&amp;gt; (abs (p-y p-min)) delta));;\u043d\u0430\u0447\u0430\u043b\u043e \u0444\u0438\u0433\u0443\u0440\u044b \u0441\u0434\u0432\u0438\u043d\u0443\u0442\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e           (set! tr (comb-tr2d             ;;\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043d\u0430\u0434\u043e \u043f\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044c \u0442\u0443\u0434\u0430!                     (make-tr2d-move (- (p-x p-min)) (- (p-y p-min)))                     tr)))       (do ((cur list-fig (cdr cur)))             ((null? cur) list-fig)          (let ((cur-fig (car cur)))             (draw-fig img cur-fig tr)             ))       ;;(gimp-context-pop)   ))  (define (min-pos-figs list-fig)    (let ((min-x maxnum)          (min-y maxnum))       (do ((cur list-fig (cdr cur)))             ((null? cur) (p! min-x min-y))          (let ((cur-p (car cur)))             (if (&amp;lt; (fig-min-x cur-p) min-x)                 (set! min-x (fig-min-x cur-p)))             (if (&amp;lt; (fig-min-y cur-p) min-y)                 (set! min-y (fig-min-y cur-p)))             )          )))  (define (max-pos-figs list-fig)    (let ((max-x minnum)          (max-y minnum))       (do ((cur list-fig (cdr cur)))             ((null? cur) (p! max-x max-y))          (let ((cur-p (car cur)))             (if (&amp;gt; (fig-max-x cur-p) max-x)                 (set! max-x (fig-max-x cur-p)))             (if (&amp;gt; (fig-max-y cur-p) max-y)                 (set! max-y (fig-max-y cur-p)))             )))) <\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0435\u0451 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<pre><code class=\"lisp\">(define bsh1 (make-brush1 :name  \"2. Hardness 075\"  :size 20)) (define bsh2 (make-brush1 :name  \"2. Hardness 025\"  :size 10)) ;;2.6 ;;\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a\u0438\u0435 \u043a\u0438\u0441\u0442\u0438 \u0435\u0441\u0442\u044c. ;;(gimp-brushes-get-list \".*\") ;;Circle Fuzzy (11) (define bsh1 (make-brush1 \"Circle Fuzzy (17)\" :name \"My Brush1\" :radius 20)) (define bsh2 (make-brush2 \"My Brush1\" :radius 10 :aspect-ratio 0.5))  ;; \u0440\u0438\u0441\u0443\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u0437\u0432\u0435\u0437\u0434\u0443. (define c2 (translate-contour (make-star 50 5 0.3)                               (make-tr2d-rot -90))) (define p1n (min-pos c2)) (define p1x (max-pos c2))  (define c2o (translate-contour c2                                (make-tr2d-move (abs (p-x p1n)) (abs (p-y p1n)))))  (define f2 (make-shape-fig c2o :name 'star1 :color '(127 127 0))) (define f3 (make-brush-fig c2o :name 'star2 :color '(127 0 255) :brush bsh1)) ;;(define f4 (make-pencil-fig c2o :name 'star3 :color '(0 0 255) :brush bsh2)) (define f4 (make-brush-fig c2o :name 'star3 :color '(255 0 0) :brush bsh2))  (define fs1 (list f2 f3 f4)) (define r1 (make-rect-by-vect (p! 100 50) (p! 200 0) (p! 0 200)))  (draw-figs i1 fs1 r1) <\/code><\/pre>\n<p>\u042f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u043b \u0444\u043e\u043d, \u0442\u0430\u043a \u0447\u0442\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0435.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/38f\/30d\/1e2\/38f30d1e2fd5b22b12ee219cd330efa5.png\" alt=\"&quot;\u0420\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0438\u0433\u0443\u0440 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u043c&quot;\" width=\"365\" height=\"351\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/38f\/30d\/1e2\/38f30d1e2fd5b22b12ee219cd330efa5.png\"\/><\/p>\n<div><figcaption>&#171;\u0420\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0438\u0433\u0443\u0440 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u043c&#187;<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u043e\u0439(\u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0439) \u0444\u0438\u0433\u0443\u0440\u044b, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0435\u043b\u043e\u043a.<\/p>\n<h2>\u0421\u0442\u0440\u0435\u043b\u043a\u0430.<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0443\u0440 \u0441\u0442\u0440\u0435\u043b\u043a\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043b\u0435\u0433\u043a\u043e. \u0412\u043e \u043f\u0435\u0440\u0432\u044b\u0445 \u043a\u043e\u043d\u0442\u0443\u0440 \u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u0438\u0437 \u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442, \u0430 \u0441\u0430\u043c\u0430 \u0441\u0442\u0440\u0435\u043b\u043a\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0432\u0435\u043a\u0442\u043e\u0440 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u043c\u044b\u0439 \u0442\u043e\u0447\u043a\u043e\u0439.<\/p>\n<pre><code class=\"lisp\">(define tr-s-arrow       (make-tr2d-scale (- (\/ 1 10)) (- (\/ 1 10)))) (define tr-up-arrow      (make-tr2d-rot  15)) (define tr-down-arrow    (make-tr2d-rot (- 15))) (define (make-arrow1 target)    (let* ((p2 (p-tr2d target tr-s-arrow))           (p3 (p-tr2d p2     tr-down-arrow))           (p4 (p-tr2d p2     tr-up-arrow))           (tr-s1 (make-tr2d-move (p-x target) (p-y target)))           (p3a (p-tr2d p3 tr-s1))           (p4a (p-tr2d p4 tr-s1)))       (list (p! 0 0) target p3a p4a target))) <\/code><\/pre>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0443\u0440 \u0438\u043c\u0435\u0435\u0442 \u043e\u0441\u0442\u0440\u0438\u0435 \u0440\u0430\u0432\u043d\u043e\u0435 \u0434\u0435\u0441\u044f\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b \u0441\u0442\u0440\u0435\u043b\u043a\u0438, \u0438 \u0443\u0433\u043e\u043b \u0437\u0430\u043e\u0441\u0442\u0440\u0435\u043d\u0438\u044f 30 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432.<\/p>\n<details class=\"spoiler\">\n<summary>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c:<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"lisp\">;;\u043a\u043e\u043d\u0442\u0443\u0440 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 (define c8 (make-rect-contour 0 0 50 50)) ;;\u043a\u043e\u043d\u0442\u0443\u0440 \u0441\u0442\u0440\u0435\u043b\u043a\u0438 \u0441\u0434\u0432\u0438\u043d\u0443\u0442\u043e\u0439 \u043a \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430. (define c9 (translate-contour  (make-arrow1 (p! 0 50))                                (make-tr2d-move 25 0)))  ;;2.10 (define bsh4 (make-brush1 :name  \"2. Hardness 075\"  :size 5)) ;;2.6 (define bsh4 (make-brush2 \"My Brush1\" :radius 2))  ;;\u0441\u043e\u0441\u0442\u0430\u0432\u043d\u0430\u044f \u0444\u0438\u0433\u0443\u0440\u0430 \u0438\u0437 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430, \u0437\u0430\u043b\u0438\u0432\u043a\u0438 \u0438 \u0441\u0442\u0440\u0435\u043b\u043a\u0438. (define fs3    (list     (make-shape-fig  c8 :color '(255 255 0))     (make-pencil-fig c8 :color '(0 255 0) :brush bsh4)     (make-pencil-fig c9 :color '(255 0 0) :brush bsh4))) ;; \u0440\u0438\u0441\u0443\u0435\u043c \u0432 3\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0430\u043c\u043a\u0430\u0445, \u0440\u0430\u043c\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0435\u0439 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0440\u0430\u043c\u043a\u0438 100\u0445100 (draw-figs i1 fs3 (rect! (p! 0 0) (p! 100 0) (p! 0 100))) (draw-figs i1 fs3             (rect-tr2d base-rect                       (comb-tr2d                        (make-tr2d-scale 100 50)                        (make-tr2d-rot 45)                        (make-tr2d-move 300 200)))) (draw-figs i1 fs3             (rect-tr2d base-rect                       (comb-tr2d                        (make-tr2d-scale 100 100)                        (make-tr2d-shear-x -40)                        (make-tr2d-shear-y 10)                        (make-tr2d-rot -45)                        (make-tr2d-move 75 335))))<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8ca\/9b5\/2e4\/8ca9b52e4ccaa7c284df59f30d9c2ca4.png\" alt=\"&quot;\u0420\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 c\u0442\u0440\u0435\u043b\u043a\u0438 \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0435&quot;\" width=\"409\" height=\"464\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8ca\/9b5\/2e4\/8ca9b52e4ccaa7c284df59f30d9c2ca4.png\"\/><\/p>\n<div><figcaption>&#171;\u0420\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 c\u0442\u0440\u0435\u043b\u043a\u0438 \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0435&#187;<\/figcaption><\/div>\n<\/figure>\n<h2>\u0418\u0442\u043e\u0433\u043e<\/h2>\n<p>\u041c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0444\u0438\u0433\u0443\u0440\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u043d\u0442\u0443\u0440\u043e\u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430, \u0438 \u0440\u0438\u0441\u0443\u0435\u043c\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043a\u0438\u0441\u0442\u0435\u0439.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/875962\/\"> https:\/\/habr.com\/ru\/articles\/875962\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><a href=\"https:\/\/gitflic.ru\/project\/nuinu\/gimp-script-fu-ext\" rel=\"noopener noreferrer nofollow\">\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043a Script-fu<\/a><\/p>\n<p>\u041c\u044b \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043a\u043e\u043d\u0442\u0443\u0440\u044b, \u0434\u043b\u044f \u0432\u044b\u0447\u0435\u0440\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u0440\u0438\u0432\u044b\u0445 \u043b\u0438\u043d\u0438\u0439, \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0439, \u0434\u043b\u044f \u0437\u0430\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041d\u043e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f \u043a\u043e\u043d\u0442\u0443\u0440\u0430 \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u0438(\u0442\u043e\u0447\u043a\u0438), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0441\u0432\u043e\u0435\u043c\u0443 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044e. \u041f\u043e\u0440\u0430 \u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044e \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0443\u0440\u0430, \u043a\u0438\u0441\u0442\u044c, \u0446\u0432\u0435\u0442, \u0438 \u0442\u0438\u043f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0431\u0443\u0434\u044c \u044d\u0442\u043e \u0444\u0438\u0433\u0443\u0440\u0430 \u0438\u043b\u0438 \u0433\u043e\u043b\u044b\u0439 \u043a\u043e\u043d\u0442\u0443\u0440. \u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443\u044f\u0441\u044c \u044d\u0442\u0438\u043c\u0438 \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u0438 \u043e\u043a\u0440\u0443\u0436\u0438\u043b \u0435\u0451 \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0441\u043e\u0437\u0434\u0430\u044e\u0449\u0438\u0445 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044e \u0444\u0438\u0433\u0443\u0440\u044b.<\/p>\n<pre><code class=\"lisp\">;;\u0444\u0438\u0433\u0443\u0440\u0430 \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0443\u0440, \u0441\u043e\u0435\u0434\u0438\u043d\u0451\u043d\u043d\u044b\u0439 \u0441 \u0446\u0432\u0435\u0442\u043e\u043c \u0438 \u043a\u0438\u0441\u0442\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044d\u0442\u043e\u0442 \u043a\u043e\u043d\u0442\u0443\u0440 \u043d\u0430\u0434\u043e \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c. ;;\u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0433\u0430\u0431\u0430\u0440\u0438\u0442\u043e\u0432 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 ;;\u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c. \u043f\u0440\u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f\u0445 \u044d\u0442\u043e \u043d\u0430\u0434\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c. ;;========================================================================================== (struct fig (name type color brush contour min-x min-y max-x max-y)) ;;========================================================================================== <\/code><\/pre>\n<p>\u041d\u0430\u0431\u043e\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441\u043e\u0437\u0434\u0430\u044e\u0449\u0438\u0445 \u0444\u0438\u0433\u0443\u0440\u044b:<\/p>\n<pre><code class=\"lisp\">(define default-color '(127 127 127)) (define default-brush (make-brush2 \"Circle (05)\"))  ;; \u044d\u0442\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043d\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c (define (make-fig contour type name color brush)   (let ((min-p (min-pos contour))         (max-p (max-pos contour)))      (fig! name type color brush            contour            (p-x min-p) (p-y min-p)            (p-x max-p) (p-y max-p))))  ;;\u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u0444\u0438\u0433\u0443\u0440\u0443-\u043a\u043e\u043d\u0442\u0443\u0440 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u0446\u0432\u0435\u0442\u043e\u043c \u0438 \u043a\u0438\u0441\u0442\u044c\u044e (defun (make-brush-fig contour &amp;key :name :color :brush)   (make-fig contour 'brush name             (if (not color)                 default-color                 color)             (if (not brush)                 default-brush                 brush)))                  ;;\u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0444\u0438\u0433\u0443\u0440\u0443 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u0443\u044e \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c. (defun (make-shape-fig contour &amp;key :name :color :brush)    (make-fig contour 'shape name              (if (not color)                  default-color                  color)              (if (not brush)                  default-brush                  brush)))  ;;\u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0444\u0438\u0433\u0443\u0440\u0443 \u043a\u043e\u043d\u0442\u0443\u0440 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u043a\u0430\u0440\u0430\u043d\u0434\u0430\u0448\u043e\u043c -  p\u0435ncil (defun (make-pencil-fig contour &amp;key :name :color :brush)    (make-fig contour 'pencil name              (if (not color)                  default-color                  color)              (if (not brush)                  default-brush                  brush))) <\/code><\/pre>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0444\u0438\u0433\u0443\u0440\u044b \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0443\u0440\u043e\u0432, \u0442.\u0435 \u0438\u0445 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f: \u043a\u043e\u043d\u0442\u0443\u0440, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u0438\u0441\u0442\u0438, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u0430\u0440\u0430\u043d\u0434\u0430\u0448\u0430 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c.<\/p>\n<pre><code class=\"lisp\">;;\u0432\u044b\u043d\u0435\u0441\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0442\u043e\u0447\u0435\u043a \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e (define (make-contour-vector contour num-points)    (let ((points     (make-vector (* 2 num-points) 'double))          (i   0)          (cur contour))       (while (&amp;lt; i num-points)          (vector-set! points (* 2 i)       (p-x (car cur)))          (vector-set! points (+ (* 2 i) 1) (p-y (car cur)))          (set! i   (+ i 1))          (set! cur (cdr cur)))       points))  ;;\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0444\u0438\u0433\u0443\u0440\u044b fig \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 img \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 tr (define (draw-fig img fig tr)    (let* ((contour    (if tr                           (translate-contour (fig-contour fig) tr)                           (fig-contour fig)))           (num-points (length contour))           (points     (make-contour-vector contour  num-points))           (dw         (car (gimp-image-get-active-drawable img))))       ;;(gimp-context-push)       (gimp-context-set-foreground (fig-color fig))       (cond        ((eq? (fig-type fig) 'pencil)         ((fig-brush fig))         (gimp-pencil  dw (* 2  num-points) points)        ((eq? (fig-type fig) 'brush)         ((fig-brush fig))         (gimp-paintbrush-default  dw (* 2  num-points) points))        ((eq? (fig-type fig) 'shape)         ;;(gimp-image-select-polygon  img CHANNEL-OP-REPLACE num-points points)         (gimp-free-select  img (- (* 2  num-points) 1) points  CHANNEL-OP-REPLACE 0 0 0)         (gimp-edit-fill dw  FOREGROUND-FILL)         (gimp-selection-none img))        )       ;;(gimp-context-pop)   )) <\/code><\/pre>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442-\u0444\u0443 \u043a \u0440\u0430\u0431\u043e\u0442\u0435, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u0434\u043b\u044f 2.10<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"lisp\">(define path-home (getenv \"HOME\")) (define path-lib (string-append path-home \"\/work\/gimp\/lib\/\")) (define path-work (string-append path-home \"\/work\/gimp\/\")) (load (string-append path-lib \"util.scm\")) (load (string-append path-lib \"defun.scm\")) (load (string-append path-lib \"struct.scm\")) (load (string-append path-lib \"point.scm\")) (load (string-append path-lib \"tr2d.scm\")) (load (string-append path-lib \"contour.scm\")) (load (string-append path-lib \"img.scm\")) (load (string-append path-lib \"rect.scm\")) (load (string-append path-lib \"vect.scm\")) (load (string-append path-lib \"brush.scm\")) (load (string-append path-lib \"fig.scm\"))<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0434\u043b\u044f 2.6<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"lisp\">(define path-home \"D:\") ;;\u0434\u043b\u044f \u0432\u0438\u043d\u0434\u043e\u0432\u0441 ;;(define path-home (getenv \"HOME\")) (define path-lib (string-append path-home \"\/work\/gimp\/lib\/\")) (define path-work (string-append path-home \"\/work\/gimp\/\")) (load (string-append path-lib \"util.scm\")) (load (string-append path-lib \"defun.scm\")) (load (string-append path-lib \"struct.scm\")) (load (string-append path-lib \"point.scm\")) (load (string-append path-lib \"tr2d.scm\")) (load (string-append path-lib \"contour.scm\")) (load (string-append path-lib \"img2.6.scm\")) (load (string-append path-lib \"rect.scm\")) (load (string-append path-lib \"vect.scm\")) (load (string-append path-lib \"brush-2.6.scm\")) (load (string-append path-lib \"fig2.6.scm\"))<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0442\u0435\u0441\u0442, \u043d\u0430 \u0434\u0432\u0443\u0445 \u0444\u0438\u0433\u0443\u0440\u0430\u0445<\/p>\n<pre><code class=\"lisp\">(define i1 (create-1-layer-img 640 480)) ;;\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u043f\u043e\u043b\u043e\u0442\u043d\u043e \u0434\u043b\u044f \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f.  (define c1 (make-circle-n 50 50 50 10)) (define f1 (make-brush-fig c1 :name 'circle1)) (define f2 (make-pencil-fig c1 :name 'circle2 :color '(255 255 255))) ;;(define f2 (make-pencil-fig c1 :name 'circle2 :color '(0 255 255))) (define tr3       (comb-tr2d                    (make-tr2d-scale 2 1.5)                    (make-tr2d-shear-y 15)                    (make-tr2d-rot -90)                    (make-tr2d-move 100 300)))  (draw-fig i1 f1 #f) (draw-fig i1 f2 tr3)<\/code><\/pre>\n<figure class=\"\">\n<div><figcaption>&#171;\u0420\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0438\u0433\u0443\u0440&#187;<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0438\u0441\u0443\u0435\u043c \u0444\u0438\u0433\u0443\u0440\u0443 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u0443\u044e \u0446\u0432\u0435\u0442\u043e\u043c<\/p>\n<pre><code class=\"lisp\">(define f3 (make-shape-fig c1 :name 'circle2 :color '(255 255 0))) (define tr4       (comb-tr2d                    (make-tr2d-scale 1.5 1.5)                    (make-tr2d-shear-y 0)                    (make-tr2d-rot 30)                    (make-tr2d-move 350 50))) (draw-fig i1 f3 tr4)  (define tr5       (comb-tr2d                    (make-tr2d-scale 1. 1.)                    (make-tr2d-shear-x 20)                    (make-tr2d-rot 0)                    (make-tr2d-move 90 100))) (draw-fig i1 f3 tr5)<\/code><\/pre>\n<figure class=\"\">\n<div><figcaption>&#171;\u0420\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0438\u0433\u0443\u0440 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u043c&#187;<\/figcaption><\/div>\n<\/figure>\n<p>\u0420\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0443\u0440\u0430, \u0447\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0431\u0435\u0434\u043d\u044f\u0435\u0442 \u043d\u0430\u0448\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439. \u0410 \u0432\u043e\u0442 \u0435\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0444\u0438\u0433\u0443\u0440\u044b \u0432 \u0441\u043f\u0438\u0441\u043e\u043a, \u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044e. \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0449\u0443\u044e \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443. \u041f\u0440\u0438\u0447\u0451\u043c \u0434\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043d\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e tr2d, \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0430 \u0440\u0430\u043c\u043a\u0443(frame), \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d\u0430 \u0441\u0430\u043c\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043a\u043e \u0432\u0441\u0435\u043c \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0432 \u043d\u0435\u0451 \u0444\u0438\u0433\u0443\u0440\u0430\u043c.<\/p>\n<pre><code class=\"lisp\">(define (draw-figs img list-fig r)    (let* ((delta      0.00001)           (p-min      (min-pos-figs list-fig))           (p-max      (max-pos-figs list-fig))           (tr         (make-tr2d-from-rect r                                            (- (p-x p-max) (p-x p-min))                                            (- (p-y p-max) (p-y p-min))))           (dw         (car (gimp-image-get-active-drawable img))))       ;;(gimp-context-push)       (if (or (&amp;gt; (abs (p-x p-min)) delta)               (&amp;gt; (abs (p-y p-min)) delta));;\u043d\u0430\u0447\u0430\u043b\u043e \u0444\u0438\u0433\u0443\u0440\u044b \u0441\u0434\u0432\u0438\u043d\u0443\u0442\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e           (set! tr (comb-tr2d             ;;\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043d\u0430\u0434\u043e \u043f\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044c \u0442\u0443\u0434\u0430!                     (make-tr2d-move (- (p-x p-min)) (- (p-y p-min)))                     tr)))       (do ((cur list-fig (cdr cur)))             ((null? cur) list-fig)          (let ((cur-fig (car cur)))             (draw-fig img cur-fig tr)             ))       ;;(gimp-context-pop)   ))  (define (min-pos-figs list-fig)    (let ((min-x maxnum)          (min-y maxnum))       (do ((cur list-fig (cdr cur)))             ((null? cur) (p! min-x min-y))          (let ((cur-p (car cur)))             (if (&amp;lt; (fig-min-x cur-p) min-x)                 (set! min-x (fig-min-x cur-p)))             (if (&amp;lt; (fig-min-y cur-p) min-y)                 (set! min-y (fig-min-y cur-p)))             )          )))  (define (max-pos-figs list-fig)    (let ((max-x minnum)          (max-y minnum))       (do ((cur list-fig (cdr cur)))             ((null? cur) (p! max-x max-y))          (let ((cur-p (car cur)))             (if (&amp;gt; (fig-max-x cur-p) max-x)                 (set! max-x (fig-max-x cur-p)))             (if (&amp;gt; (fig-max-y cur-p) max-y)                 (set! max-y (fig-max-y cur-p)))             )))) <\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0435\u0451 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<pre><code class=\"lisp\">(define bsh1 (make-brush1 :name  \"2. Hardness 075\"  :size 20)) (define bsh2 (make-brush1 :name  \"2. Hardness 025\"  :size 10)) ;;2.6 ;;\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a\u0438\u0435 \u043a\u0438\u0441\u0442\u0438 \u0435\u0441\u0442\u044c. ;;(gimp-brushes-get-list \".*\") ;;Circle Fuzzy (11) (define bsh1 (make-brush1 \"Circle Fuzzy (17)\" :name \"My Brush1\" :radius 20)) (define bsh2 (make-brush2 \"My Brush1\" :radius 10 :aspect-ratio 0.5))  ;; \u0440\u0438\u0441\u0443\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u0437\u0432\u0435\u0437\u0434\u0443. (define c2 (translate-contour (make-star 50 5 0.3)                               (make-tr2d-rot -90))) (define p1n (min-pos c2)) (define p1x (max-pos c2))  (define c2o (translate-contour c2                                (make-tr2d-move (abs (p-x p1n)) (abs (p-y p1n)))))  (define f2 (make-shape-fig c2o :name 'star1 :color '(127 127 0))) (define f3 (make-brush-fig c2o :name 'star2 :color '(127 0 255) :brush bsh1)) ;;(define f4 (make-pencil-fig<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-445935","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/445935","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=445935"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/445935\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=445935"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=445935"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=445935"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}