Download (as "Hello-World.txt") Hello-World
#!/usr/bin/perl -w
use GDS2;
use strict;
require './text2gds.pm'; # 文字を描く
# ---------------------------------
# 文字を直接 x, y 座標に置く
# text2gds::text_flat(x, y, Layer, Dot size, Text, FileHandle);
# -----------------------------------------
# ---------------------------------
our @ARGS;
our %opts;
my($VERSION);
$VERSION = "2019-07-15 09:35" ; # written by emacs time-stamp
## --------------------------------------------
## M A I N R O U T I N E
## --------------------------------------------
my ($gds2File);
my $filename = $0;
$filename =~ s/\.txt$//; # --- Strip '.txt' part
$filename .= '.gds';
print 'output name: '. $filename, "\n";
unlink $filename;
$gds2File = new GDS2(-fileName=> '>'. $filename );
$gds2File -> printInitLib(-name=>'LibraryName');
my $x = 0;
my $y = 0;
my $layer = 10;
my $dot_size = 0.8;
$gds2File -> printBgnstr( -name=> 'hello-world');
text2gds::text_flat($x, $y, $layer, $dot_size, 'Hello', $gds2File);
text2gds::text_flat($x, $y - $dot_size * 11, $layer, $dot_size, 'World!', $gds2File);
$gds2File -> printEndstr;
$gds2File -> printEndlib();
__END__
(ここから下は、 Perl は読みません)
(require 'time-stamp)
(add-hook 'write-file-hooks 'time-stamp)
(setq time-stamp-active t)
;; (setq time-stamp-time-zone "UTC")
(setq time-stamp-time-zone nil)
(setq time-stamp-format "%04y-%02m-%02d %02H:%02M");
(setq time-stamp-start "$VERSION = \"") ;
(setq time-stamp-end "\"") ;
(setq time-stamp-line-limit 20) ; ; default is 8
|