![]() |
![]() |
7 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl
use GD;
use CGI::Carp qw(fatalsToBrowser);
$im = new GD::Image(400,150);
$hintergrund = $im->colorAllocate(255,254,216);
$im->fill(50,50,$hintergrund);
print "Content-Type: Image/JPEG\n\n";
print $im->jpeg;
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
#!/usr/bin/perl
use GD;
use CGI::Carp qw(fatalsToBrowser);
$im = new GD::Image(400,150);
$hintergrund = $im->colorAllocate(255,255,255);
$linienfarbe = $im->colorAllocate(186,221,148);
$textcolor = $im->colorAllocate(0,0,0);
print "Content-Type: Image/JPEG\n\n";
$im->string(gdLargeFont,100,20,"Juni",$textcolor);
$im->string(gdLargeFont,200,20,"Juli",$textcolor);
$im->string(gdLargeFont,300,20,"August",$textcolor);
$im->string(gdLargeFont,10,40,"100%",$textcolor);
$im->string(gdLargeFont,10,80,"50%",$textcolor);
$im->string(gdLargeFont,10,120,"0%",$textcolor);
@array = (1,2,50,40);
$poly = new GD::Polygon;
for (@array) {
$poly->addPt($old, $_);
$old = $_;
}
$im->polygon($poly,$linienfarbe);
print $im->jpeg;
1
2
3
4
5
6
7
8
9
10
11
12
13
@array = (1,2,50,40);
$x1 = 60; #linkes ende, horizontal
$y1 = 120; #linkes ende, vertikal
$x2 = 90; #rechtes ende, horizontal
$y2 = 100; # rechtes ende, vertikal
for (@array) {
$y2 = $_;
$y1+9;
$im->line($x1, $y1, $_, $y2, $linienfarbe);
$x1 = $_;
}
![]() |
![]() |
7 Einträge, 1 Seite |