summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/fonts/itrans/flag.ips
blob: 23e8f8abeda61cf8cc24d5406559e3c3ef4f41d9 (plain)
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
% Devanagari Example
% $Header: /home/cvsroot/itrans/nextrel/doc/flag.ips,v 1.1.1.1 1996/11/29 01:45:31 avinash Exp $
% This is an example direct PostScript input to the itrans program.
% This file shows how to change fonts, change font size, etc
% in the file..
%
% Prints indian anthem, flag song, and the flag itself! Must SEE!

% *** Thanks to numerous others for making lots of spelling corrections
%     in the original document I wrote... [abc]

% 15 englishfont % set current font to be an english font (see itrans.pro)
% (itrans sample file: flag.ips) show
% first, the two songs......

% define functions that load in the font..
/devn18 {
    18 normalfont % get the normal devnagri font, at 18 point size
} def

/devns25 {
    25 slantfont 	% define a slanted font, using the a 25pt font size
} def

#hindiifm=dvnc.ifm
#hindifont=devn18

#hindi
vijayii vishvatira.ngaa pyaaraa |
    jha.nDaa uu.Nchaa rahe hamaaraa ||
sadaa shakti sarasaanevaalaa |
premasudhaa barasaanevaalaa ||
viiro.nko harashhaanevaalaa |
maat.rbhuumi kaa tanamana saaraa |
    jha.nDaa uu.Nchaa rahe hamaaraa ||
shaana na isakii jaane paaye |
chaahe jaana bhale hii jaaye ||
vishvavijaya karake dikhalaaye |
taba hove praNa puurNa hamaaraa |
    jha.nDaa uu.Nchaa rahe hamaaraa ||
#endhindi

newline
0.4 setlinewidth
currentpoint
currentpoint exch pop 0.0 exch moveto
206 0 rmoveto 200 0 rlineto stroke % draw a straight line..
moveto % use x,y of first currentpoint above
       % this is important, the current point must always exist
       % for itrans.pro and this document to print correctly:
       % the macros newline, etc make use of it.
newline

#hindifont=devns25 % use the slanted font, 25pt font size

#hindi
        jana gaNa mana adhinaayaka jaya he
            bhaarata bhaagya vidhaataa
        pa.njaaba si.ndhu gujaraata maraaThaa
            dravi.Da utkala va.nga
        vi.ndhya himaachala yamunaa ga.ngaa
            uchchhala jaladhi tara.nga
        tava shubha naame jaage
        tava shubha aashishha maage
            gaahe tava jaya gaathaa
        jana gaNa ma.ngala daayaka jaya he
            bhaarata bhaagya vidhaataa
        jaya he jaya he jaya he
            jaya jaya jaya jaya he

                         - raviindranaatha Taagora #endhindi

% now, code to draw an indian flag.
% draw the center wheel
/drawwheel { % diameter drawwheel --
	     % draws a wheel at the currentpoint, of the  given diameter

    2 div /rad exch def % get radius
    gsave

    currentpoint translate

    0 0 rad 0 360 arc stroke	% draw the wheel outline

    % compute radius of the small circles hanging off the wheel..
    /smallrad rad 7.5 sin mul def
    /smallcx rad 7.5 cos mul def

    0 15 345 { % draw the 24 spokes
	gsave
	rotate % use the for loop variable value, 0..245

	0 0 moveto rad 0 lineto stroke % draw spoke

	smallcx smallrad -1 mul smallrad 82.5 262.5 arc fill
	grestore
    } for
    grestore
} def

% some color definitions
/blackcolor {
    0.0 setgray
} def

/whitecolor {
    1.0 setgray
} def

/redcolor {
    1.0 0.0 0.0 setrgbcolor
} def

/bluecolor {
    0.0 0.0 1.0 setrgbcolor
} def

/greencolor {
    0.0 1.0 0.0 setrgbcolor
} def

/saffroncolor {
    1.0 0.34 0.0 setrgbcolor
} def

%------------------------------------------------------------------------
% The following may be redefined to blackcolor, see below....


% draw the entire flag 
/drawflag { % width drawwheel --
	     % draws a flag at the currentpoint, of the  given width
	     % (height = width/2)
    /width exch def
    gsave
    currentpoint translate
    /height width 2.0 div def
    /hrect height 3.0 div def

    % draw bottom green rect (use intensity = 58.7%)
    greencolor
    0 0 moveto width 0 lineto width hrect lineto 0 hrect lineto
    closepath fill

    % draw top saffron rect (== 100% red, 34% green use intensity=50.0%)
    0 hrect 2.0 mul translate
    saffroncolor
    0 0 moveto width 0 lineto width hrect lineto 0 hrect lineto
    closepath fill
    0 hrect -2.0 mul translate % restore matrix

    % draw center wheel
    blackcolor
    0.8 setlinewidth
    width 2.0 div height 2.0 div moveto
    hrect 0.95 mul drawwheel

    % draw a boundary
    blackcolor 0.4 setlinewidth
    0 0 moveto width 0 lineto width height lineto 0 height lineto
    closepath stroke
    0 hrect moveto width hrect lineto stroke
    0 hrect hrect add moveto width hrect hrect add lineto stroke

    grestore
} def

% draw the flag next to the first song...
250 560 moveto 300 drawflag

% no showpage in flag.ips, since itrans will produce it..