fh.h42.de - What´s the question?
Navigation: [START] [00-ws] [glmm] [glmm07.htm]
[print]  [e-mail]  [main]

Postscript

Ziel dieser Übung war das Erstellen eines Postscript-Dokuments.
Mittels eines normalen Texteditors wurde eine Datei im Postscript-Format erstellt. Anschließend wurde das Programm "Ghostscript" benutzt, um dieses Format zu interpretieren. Es folgt mein Beispielcode der Übungen:
Download: ps1.ps
1. Postscriptbeispiel
% Quadrat

100 300 moveto
300 300 lineto
300 500 lineto
100 500 lineto
10 setlinewidth
closepath
stroke

% 2. Quadrat mit schwarzen Rand
100 300 moveto
300 300 lineto
300 500 lineto
100 500 lineto
0.7 setgray
fill
closepath
stroke

% Dreieck
150 550 moveto
450 600 lineto
250 800 lineto
0.5 setgray %0 schwarz - 1 weiß
fill
closepath
stroke

%relative Befehle
100 300 moveto
300 50 rmoveto
150 50 rlineto
0 200 rlineto
-100 -50 rlineto
closepath
stroke
showpage

Download: ps2.ps
% Zweites PostScriptprogramm
% Kreisbogen Pilz

%1. Pilz (weiß mit schwarzen Kanten)
100 500 moveto
200 500 lineto
200 100 lineto
300 100 lineto
300 500 lineto
400 500 lineto
250 500 200 0 180 arc %x y r w1 w2
10 setlinewidth
closepath
stroke

%2. Pilz (grau gefüllt)
100 500 moveto
200 500 lineto
200 100 lineto
300 100 lineto
300 500 lineto
400 500 lineto
250 500 200 0 180 arc %x y r w1 w2
closepath
0.7 setgray
fill
stroke

%Schrift einfügen
0 setgray
/Times-Roman findfont
30 scalefont
setfont
150 580 moveto
(Das ist ein Pilz!) show

%Schrift drehen
30 rotate
0 setgray
/Arial findfont
50 scalefont
setfont
300 250 moveto
(Ein Drehpilz) show

showpage

vorige Woche: Videobearbeitung nächste Woche: HTML (3)
News
12.10.: Seiten zum WS03 aktualisiert
02.09: Seite zum WLAN-Projekt aktualisiert
10.04: Seiten zum SS03 aktualisiert
12.08: Eigene Vorlage für Seminararbeiten der FH hinzugefügt
14.07: Informationen zum 5. Semester hinzugefügt.
14.07: Druckfunktion für die Seiten überarbeitet: Auflistung der Hyperlinks über Fußnoten realisiert.
04.06: Links für IT-Sec neu strukturiert
27.04: Projekte des SS02 hinzugefügt
07.04: Lehrveranstaltungen des SS02 hinzugefügt
07.04: Dokumentation zum X-Terminals Projekt
Navigation: [START] [00-ws] [glmm] [glmm07.htm]
[print]  [e-mail]  [main]