Thread Vertikale Spaltenbeschriftung für table (HTML) (72 answers)
Opened by bianca at 2010-08-01 20:39

bianca
 2010-08-02 10:34
#140219 #140219
User since
2009-09-13
6978 Artikel
BenutzerIn

user image
2010-08-02T07:44:16 GwenDragon
Das alles in eine Funktion umzuwandeln ist ja für bianca einfach. ;)

Wenn Du Dich da mal nicht täuscht :)
Bin schon wieder zu doof.

Es erzeugt mir schwarze Schrift auf schwarzem Grund oder wie sehe ich das? :))
Zumindest sehe ich keine Schrift im Image.

Code (perl): (dl )
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
#!/usr/bin/perl -w
use 5.008;
use strict;
use diagnostics;
use warnings;
use CGI;
use CGI::Carp qw (fatalsToBrowser warningsToBrowser);
use GD;

my $string = "Das ist ein Text!";

my $font = GD::Font->Small;
my $height = $font->height;     
my $width = $font->width;     

my $im = GD::Image->new($height,5 + $width * length $string);
my $white = $im->colorAllocate(255,255,255);

my $color = $im->colorAllocate(0,0,0);  # ist Schwarz

$im->transparent($white);

$im->stringUp($font,0,$width * length $string,$string,$color);

open my $file,'>','hochkantschrift.png';
binmode ($file);
print $file $im->png;
10 print "Hallo"
20 goto 10

View full thread Vertikale Spaltenbeschriftung für table (HTML)