Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print <<'EOM';
- <style>
- hr {position:absolute;border: inset 1px;left:0px;width:800px;}
- span {position:absolute; font-size: 16px; font-family:monospace;
- transform-origin:0% 0%;white-space: pre-wrap;}
- .bold {font-weight:bold;}
- .small {transform:scale(0.75,0.75)translate(0px,4px);}
- .italic {font-style:italic;}
- .grey {color:grey;}
- .blue {color:blue;}
- .red {color:red;}
- .green {color:green;}
- .royal {color:purple;}
- .highlighted {background-color:gold;}
- .underlined {border-bottom: 1px solid black;}
- .strikethru {text-decoration:line-through;}
- .dblht.dblwid {transform:scale(2,2);}
- .dblwid:not(.dblht) {transform:scale(2,1);}
- .dblht:not(.dblwid) {transform:scale(1,2);}
- </style>
- <p><span>
- EOM
- $x = 0;
- $y = 0;
- $w = 10;
- $h = 16;
- $size = "";
- $decor = '';
- $weight = '';
- $color = "";
- $style = '';
- $lastclass = 'kklklkslkalkjsdlad';
- while(1){
- $c=getc();
- if(!defined $c){last;}
- $n = ord($c);
- if($c eq '^'){
- $c=getc();
- $n=ord($c)-ord('@');
- }
- again:
- if($c eq'>'){$cc="&#".$n.";";
- }elsif($c eq'<'){$cc="&#".$n.";";
- }elsif($c eq'&'){$cc="&#".$n.";";
- }else{$cc=$c;}
- if($n>=32){
- $class = $size.$decor.$weight.$color.$style;
- if($lastclass ne $class || $y != $lasty || $lastx != $x){
- print "</span><span class='".$class."' style='height:16px;"#width:10px;
- ."left:".$x."px;top:".$y."px;'>".$cc;
- }else{
- print $cc;
- }
- $x += $w;
- $lastclass = $class;
- $lasty = $y;
- $lastx = $x;
- }elsif($n==1){
- $weight = 'bold ';
- }elsif($n==2){
- $size = '';
- $weight = '';
- $decor = '';
- $style = '';
- $color = '';
- $w=10;
- $h=16;
- }elsif($n==3){
- $size = 'small ';
- $w = 7.5;
- $h = 12;
- }elsif($n==5){
- $style = 'italic ';
- }elsif($n==6){
- $decor = 'underlined ';
- }elsif($n==7){
- $decor = 'highlighted ';
- }elsif($n==8){
- $x -= $w;
- }elsif($n==9){
- $x += $w/2;
- }elsif($n==10){
- $y += $h;
- }elsif($n==11){
- $y += $h/2;
- }elsif($n==12){
- print "<hr style='top:".($y+$h)."px'/>\n";
- $y += $h*2;
- }elsif($n==13){
- $x = 0;
- }elsif($n==16){
- $color = 'grey ';
- }elsif($n==17){
- $color = 'green ;'
- }elsif($n==18){
- $color = 'red ';
- }elsif($n==19){
- $color = 'blue ';
- }elsif($n==20){
- $color = 'royal ';
- }elsif($n==21){
- $decor = 'strikethru ';
- }elsif($n==22){
- $size .= 'dblwid ';
- $w = 20;
- }elsif($n==23){
- $size .= 'dblht ';
- $h = 32;
- }elsif($n==24){
- $style = '';
- $decor = '';
- $weight = '';
- }elsif($n==25){
- $color = '';
- }elsif($n==28){
- getc();
- }elsif($n==30){
- $n = ord('^');
- goto again;
- }
- }
- print '</span></p>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement