plug-ins/script-fu/scripts/Makefile.am removed this script as it is broken

2004-12-22  Sven Neumann  <sven@gimp.org>

	* plug-ins/script-fu/scripts/Makefile.am
	* plug-ins/script-fu/scripts/asc2img.scm: removed this script as it
	is broken beyond repair and the functionality is provided by the
	text tool itself.
This commit is contained in:
Sven Neumann 2004-12-22 16:21:17 +00:00 committed by Sven Neumann
parent 360e067709
commit 02d2a673c9
6 changed files with 38 additions and 309 deletions

View File

@ -1,3 +1,10 @@
2004-12-22 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/scripts/Makefile.am
* plug-ins/script-fu/scripts/asc2img.scm: removed this script as it
is broken beyond repair and the functionality is provided by the
text tool itself.
2004-12-22 Sven Neumann <sven@gimp.org>
* NEWS: added NEWS for the stable branch (no, we haven't branched

View File

@ -15,7 +15,6 @@ scriptdata_DATA = \
alien-glow-button.scm \
alien-glow-logo.scm \
alien-neon-logo.scm \
asc2img.scm \
basic1-logo.scm \
basic2-logo.scm \
beveled-button.scm \

View File

@ -1,257 +0,0 @@
; Chris Gutteridge / ECS Dept. University of Southampton, England
; "ASCII 2 Image" script for the Gimp.
;
; 8th April 1998
;
; Takes a filename of an ASCII file and converts it to a gimp image.
; Does sensible things to preserve indents (gimp-text strips them)
;
; cjg@ecs.soton.ac.uk
; 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 2 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, write to the Free Software
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
; Define the function:
(define (script-fu-asc-2-img inFile
inFont
inFontSize
inTextColor
inTrans
inBackColor
inBufferAmount)
(let* (
(theImage (car (gimp-image-new 10 10 RGB) ) )
(theLayer (car (gimp-layer-new theImage
10
10
RGBA-IMAGE
"layer 1"
100
NORMAL-MODE) ) )
(theImageWidth 0)
(theImageHeight 0)
(theBuffer)
)
(gimp-context-push)
(gimp-context-set-background inBackColor)
(gimp-drawable-set-name theLayer "Background")
(gimp-image-add-layer theImage theLayer 0)
(script-fu-asc-2-img-layer theImage theLayer inFile inFont inFontSize
inTextColor inBufferAmount)
(set! theImageWidth (car (gimp-drawable-width
(car (gimp-image-get-active-layer theImage)))))
(set! theImageHeight (car (gimp-drawable-height
(car (gimp-image-get-active-layer theImage)))))
(set! theBuffer (* inFontSize (/ inBufferAmount 100) ) )
(set! theImageWidth (+ theImageWidth theBuffer theBuffer ))
(set! theImageHeight (+ theImageHeight theBuffer ))
(gimp-image-resize theImage theImageWidth theImageHeight theBuffer theBuffer)
(gimp-layer-resize theLayer theImageWidth theImageHeight theBuffer theBuffer)
(gimp-selection-all theImage)
(if (= inTrans TRUE)
(gimp-edit-clear theLayer)
(gimp-edit-fill theLayer BACKGROUND-FILL)
)
(gimp-selection-none theImage)
(gimp-display-new theImage)
(gimp-displays-flush)
(gimp-context-pop)
)
)
(define (script-fu-asc-2-img-layer inImage
inLayer
inFile
inFont
inFontSize
inTextColor)
(let* (
(theImage inImage)
(theLayer inLayer)
(theFile (fopen inFile))
(otherLayers (cadr (gimp-image-get-layers theImage)))
(nLayers (car (gimp-image-get-layers theImage)))
(n nLayers)
(theImageWidth 0)
(theImageHeight 0)
(theData)
(theIndentList)
(theChar)
(allspaces)
(theIndent)
(theLine)
(theChar)
(theText)
(theCharWidth)
)
(define (cjg-add-text inData inIndentList inFont inFontSize)
(if (equal? () inData)
()
(let (
(theLine (car inData))
(theIndent (car inIndentList))
(theLineHeight 0)
(theText)
)
(if (equal? "" theLine)
()
(begin
(set! theText (car (gimp-text-fontname inImage
-1
0
0
theLine
0
TRUE
inFontSize
PIXELS
inFont)))
(set! theLineHeight (car (gimp-drawable-height theText)))
(gimp-layer-set-offsets theText
(* theCharWidth theIndent)
(+ theImageHeight
(- inFontSize theLineHeight)))
(set! theImageWidth (max
(+ (car (gimp-drawable-width theText))
(* theCharWidth theIndent))
theImageWidth ))
(if (= (car (gimp-layer-is-floating-sel theText)) TRUE)
(gimp-floating-sel-anchor theText)
)
(gimp-drawable-set-name theText theLine)
)
)
(cjg-add-text (cdr inData) (cdr inIndentList) inFont inFontSize)
)
)
)
(gimp-context-push)
(gimp-context-set-foreground inTextColor)
(gimp-selection-none theImage)
(set! theData ())
(set! theIndentList ())
(set! theChar "X")
(while (not (equal? () theChar))
(set! allspaces TRUE)
(set! theIndent 0)
(set! theLine "")
(while (begin
(set! theChar (fread 1 theFile))
(and (not (equal? "\n" theChar))
(not (equal? () theChar))
)
)
(cond
(
(equal? theChar "\t")
(set! theChar " ")
(if (= allspaces TRUE)
(set! theIndent (+ theIndent 8))
)
)
(
(equal? theChar " ")
(if (= allspaces TRUE)
(set! theIndent (+ theIndent 1))
)
)
(TRUE (set! allspaces FALSE))
)
(set! theLine (string-append theLine theChar))
)
(if (= allspaces TRUE)
(set! theLine "")
)
(if (and (equal? () theChar)
(equal? "" theLine)
)
()
(begin
(set! theData (cons theLine theData))
(set! theIndentList (cons theIndent theIndentList))
)
)
)
(set! theText (car (gimp-text-fontname theImage
-1
0
0
"X"
0
TRUE
inFontSize
PIXELS
inFont)))
(set! theCharWidth (car (gimp-drawable-width theText)))
(gimp-edit-cut theText)
(cjg-add-text (reverse theData) (reverse theIndentList) inFont inFontSize)
(gimp-context-pop)
(gimp-displays-flush)
)
)
; Register the function with the GIMP:
(script-fu-register "script-fu-asc-2-img"
_"_ASCII to Image..."
"Create a new image containing text from a simple text file"
"Chris Gutteridge: cjg@ecs.soton.ac.uk"
"8th April 1998"
"Chris Gutteridge / ECS @ University of Southampton, England"
""
SF-FILENAME _"Filename" "afile"
SF-FONT _"Font" "Bitstream Charter"
SF-ADJUSTMENT _"Font size (pixels)" '(45 2 1000 1 10 0 1)
SF-COLOR _"Text color" '(0 0 0)
SF-TOGGLE _"Transparent background" FALSE
SF-COLOR _"Background color" '(255 255 255)
SF-ADJUSTMENT _"Buffer amount (% height of text)" '(35 0 100 1 10 0 0))
(script-fu-menu-register "script-fu-asc-2-img"
_"<Toolbox>/Xtns/Script-Fu/Utils")
(script-fu-register "script-fu-asc-2-img-layer"
_"_ASCII to Layer..."
"Create a new layer of text from a simple text file"
"Chris Gutteridge: cjg@ecs.soton.ac.uk"
"30th April 1998"
"Chris Gutteridge / ECS @ University of Southampton, England"
"*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Layer" 0
SF-FILENAME _"File name" "afile"
SF-FONT _"Font" "Bitstream Charter"
SF-ADJUSTMENT _"Font size (pixels)" '(45 2 1000 1 10 0 1)
SF-COLOR _"Text color" '(0 0 0))
(script-fu-menu-register "script-fu-asc-2-img-layer"
_"<Image>/Script-Fu/Utils")

View File

@ -1,3 +1,9 @@
2004-12-22 Sven Neumann <sven@gimp.org>
* POTFILES.in: removed asc2img.scm.
* de.po: removed unused translations.
2004-12-21 Jordi Mallach <jordi@sindominio.net>
* ca.po: Forwardport from gimp-2-2.

View File

@ -20,7 +20,6 @@ plug-ins/script-fu/scripts/alien-glow-bullet.scm
plug-ins/script-fu/scripts/alien-glow-button.scm
plug-ins/script-fu/scripts/alien-glow-logo.scm
plug-ins/script-fu/scripts/alien-neon-logo.scm
plug-ins/script-fu/scripts/asc2img.scm
plug-ins/script-fu/scripts/basic1-logo.scm
plug-ins/script-fu/scripts/basic2-logo.scm
plug-ins/script-fu/scripts/beveled-button.scm

View File

@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: GIMP 2.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-12-18 01:48+0100\n"
"POT-Creation-Date: 2004-12-22 17:19+0100\n"
"PO-Revision-Date: 2004-11-18 02:31+0100\n"
"Last-Translator: Hendrik Brandt <eru@gmx.li>\n"
"Language-Team: German <gnome-de@gnome.org>\n"
@ -321,7 +321,6 @@ msgstr "Standard Bumpmap Einstellungen"
#: plug-ins/script-fu/scripts/alien-glow-button.scm.h:5
#: plug-ins/script-fu/scripts/alien-glow-logo.scm.h:4
#: plug-ins/script-fu/scripts/alien-neon-logo.scm.h:6
#: plug-ins/script-fu/scripts/asc2img.scm.h:8
#: plug-ins/script-fu/scripts/basic1-logo.scm.h:4
#: plug-ins/script-fu/scripts/basic2-logo.scm.h:5
#: plug-ins/script-fu/scripts/beveled-button.scm.h:3
@ -362,7 +361,6 @@ msgstr "Schrift"
#: plug-ins/script-fu/scripts/alien-glow-button.scm.h:6
#: plug-ins/script-fu/scripts/alien-glow-logo.scm.h:5
#: plug-ins/script-fu/scripts/alien-neon-logo.scm.h:7
#: plug-ins/script-fu/scripts/asc2img.scm.h:9
#: plug-ins/script-fu/scripts/basic1-logo.scm.h:5
#: plug-ins/script-fu/scripts/basic2-logo.scm.h:6
#: plug-ins/script-fu/scripts/beveled-button.scm.h:4
@ -490,7 +488,6 @@ msgstr "<Toolbox>/Xtns/Skript-Fu/Muster"
#: plug-ins/script-fu/scripts/alien-glow-bullet.scm.h:2
#: plug-ins/script-fu/scripts/alien-glow-button.scm.h:3
#: plug-ins/script-fu/scripts/alien-neon-logo.scm.h:4
#: plug-ins/script-fu/scripts/asc2img.scm.h:3
#: plug-ins/script-fu/scripts/basic1-logo.scm.h:3
#: plug-ins/script-fu/scripts/basic2-logo.scm.h:4
#: plug-ins/script-fu/scripts/blended-logo.scm.h:3
@ -703,7 +700,6 @@ msgid "Padding"
msgstr "Füllung"
#: plug-ins/script-fu/scripts/alien-glow-button.scm.h:11
#: plug-ins/script-fu/scripts/asc2img.scm.h:10
#: plug-ins/script-fu/scripts/basic1-logo.scm.h:7
#: plug-ins/script-fu/scripts/basic2-logo.scm.h:8
#: plug-ins/script-fu/scripts/beveled-button.scm.h:10
@ -746,48 +742,6 @@ msgstr "Breite der Streifen"
msgid "Width of gaps"
msgstr "Breite der Zwischenräume"
#: plug-ins/script-fu/scripts/asc2img.scm.h:1
#: plug-ins/script-fu/scripts/hsv-graph.scm.h:1
#: plug-ins/script-fu/scripts/image-structure.scm.h:1
msgid "<Image>/Script-Fu/Utils"
msgstr "<Image>/Skript-Fu/Hilfsmittel"
#: plug-ins/script-fu/scripts/asc2img.scm.h:2
#: plug-ins/script-fu/scripts/font-map.scm.h:1
#: plug-ins/script-fu/scripts/gradient-example.scm.h:1
msgid "<Toolbox>/Xtns/Script-Fu/Utils"
msgstr "<Toolbox>/Xtns/Skript-Fu/Hilfsmittel"
#: plug-ins/script-fu/scripts/asc2img.scm.h:5
#, no-c-format
msgid "Buffer amount (% height of text)"
msgstr "Puffer-Grösse (in % der Höhe d. Textes)"
#: plug-ins/script-fu/scripts/asc2img.scm.h:6
#: plug-ins/script-fu/scripts/select-to-brush.scm.h:3
msgid "File name"
msgstr "Dateiname"
#: plug-ins/script-fu/scripts/asc2img.scm.h:7
#: plug-ins/script-fu/scripts/select-to-pattern.scm.h:2
msgid "Filename"
msgstr "Dateiname"
#: plug-ins/script-fu/scripts/asc2img.scm.h:11
#: plug-ins/script-fu/scripts/beveled-pattern-bullet.scm.h:4
#: plug-ins/script-fu/scripts/beveled-pattern-heading.scm.h:7
#: plug-ins/script-fu/scripts/spinning-globe.scm.h:4
msgid "Transparent background"
msgstr "Transparenter Hintergrund"
#: plug-ins/script-fu/scripts/asc2img.scm.h:12
msgid "_ASCII to Image..."
msgstr "_ASCII zu Bild..."
#: plug-ins/script-fu/scripts/asc2img.scm.h:13
msgid "_ASCII to Layer..."
msgstr "_ASCII zu Bildebene..."
#: plug-ins/script-fu/scripts/basic1-logo.scm.h:8
msgid "_Basic I..."
msgstr "_Einfach I..."
@ -837,6 +791,12 @@ msgstr "<Toolbox>/Xtns/Skript-Fu/Web-Seiten/Abgeschrägt, gemustert"
msgid "Diameter"
msgstr "Durchmesser"
#: plug-ins/script-fu/scripts/beveled-pattern-bullet.scm.h:4
#: plug-ins/script-fu/scripts/beveled-pattern-heading.scm.h:7
#: plug-ins/script-fu/scripts/spinning-globe.scm.h:4
msgid "Transparent background"
msgstr "Transparenter Hintergrund"
#: plug-ins/script-fu/scripts/beveled-pattern-heading.scm.h:4
msgid "H_eading..."
msgstr "_Überschrift..."
@ -1429,6 +1389,11 @@ msgstr "Skalierung Y"
msgid "_Flatland..."
msgstr "_Flaches Land..."
#: plug-ins/script-fu/scripts/font-map.scm.h:1
#: plug-ins/script-fu/scripts/gradient-example.scm.h:1
msgid "<Toolbox>/Xtns/Script-Fu/Utils"
msgstr "<Toolbox>/Xtns/Skript-Fu/Hilfsmittel"
#: plug-ins/script-fu/scripts/font-map.scm.h:2
msgid "Active colors"
msgstr "Umriß Farbe"
@ -1698,6 +1663,11 @@ msgstr "Neue _Hilfslinie..."
msgid "_Remove all Guides"
msgstr "Alle Hilfslinien _entfernen"
#: plug-ins/script-fu/scripts/hsv-graph.scm.h:1
#: plug-ins/script-fu/scripts/image-structure.scm.h:1
msgid "<Image>/Script-Fu/Utils"
msgstr "<Image>/Skript-Fu/Hilfsmittel"
#: plug-ins/script-fu/scripts/hsv-graph.scm.h:2
msgid "BG opacity"
msgstr "HG Deckkraft"
@ -2072,6 +2042,10 @@ msgstr "Runde _Ecken..."
msgid "Brush name"
msgstr "Pinselname"
#: plug-ins/script-fu/scripts/select-to-brush.scm.h:3
msgid "File name"
msgstr "Dateiname"
#: plug-ins/script-fu/scripts/select-to-brush.scm.h:5
msgid "To _Brush..."
msgstr "Zu _Pinsel..."
@ -2080,6 +2054,10 @@ msgstr "Zu _Pinsel..."
msgid "To _Image"
msgstr "_Zu Bild"
#: plug-ins/script-fu/scripts/select-to-pattern.scm.h:2
msgid "Filename"
msgstr "Dateiname"
#: plug-ins/script-fu/scripts/select-to-pattern.scm.h:3
msgid "Pattern name"
msgstr "Mustername"
@ -2537,6 +2515,3 @@ msgstr "Glanzlicht Deckkraft"
#: plug-ins/script-fu/scripts/xach-effect.scm.h:12
msgid "_Xach-Effect..."
msgstr "_Xach-Effekt..."
#~ msgid "Copy _Visible"
#~ msgstr "_Kopiere Sichtbares"