!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux web25.us.cloudlogin.co 5.10.237-xeon-hst #1 SMP Mon May 5 15:10:04 UTC 2025 x86_64 

uid=233359(alpastrology) gid=888(tty) groups=888(tty),33(tape) 

Safe-mode: OFF (not secure)

/usr/share/doc/ImageMagick-perl/demo/   drwxr-xr-x
Free 6181.71 GB of 6262.91 GB (98.7%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     annotate_words.pl (1.92 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
#
# annotate_words.pl
#
# Take the internal string, split it into words and try to annotate each
# individual word correctly, so as to control spacing between the words
# under program control.
#
# A demonstration of using QueryFontMetrics(), by passing it exactly the same
# arguments as you would for Annotate(), to determine the location of the
# text that is/was drawn.
#
# Example script from   Zentara
#    http://zentara.net/Remember_How_Lucky_You_Are.html
#
use warnings;
use strict;
use Image::Magick;

my $image = Image::Magick->new;
$image->Set(size=>'500x200');
my $rc = $image->Read("xc:white");

my $str = 'Just Another Perl Hacker';
my (@words) = split ' ',$str;
#print join "\n",@words,"\n";

my ($x,$y) = (50,50);

foreach my $word (@words){

  $image->Annotate(font=>'Generic.ttf',
         pointsize => 24,
         fill      => '#000000ff', #last 2 digits transparency in hex ff=max
         text      => $word,
         gravity   => 'NorthWest',
         align     => 'left',
         x         => $x,
         y         => $y,
    );

  my ( $character_width,$character_height,$ascender,$descender,$text_width,
      $text_height,$maximum_horizontal_advance, $boundsx1, $boundsy1,
      $boundsx2, $boundsy2,$originx,$originy) =
          $image->QueryFontMetrics(
             pointsize => 24,
             text      => $word,
             gravity   => 'NorthWest',
             align     => 'left',
             x         => $x,
             y         => $y,
           );

  print "$word ( $character_width, $character_height,
         $ascender,$descender,
         $text_width, $text_height,
         $maximum_horizontal_advance,
         $boundsx1, $boundsy1,
         $boundsx2, $boundsy2,
         $originx,$originy)\n";

  my $n = $x + $originx + $character_width/3;  # add a space
  print "Next word at: $x + $originx + $character_width/3 => $n\n";
  $x = $n;

}

$image->Write(magick=>'SHOW',title=>"Annotate Words");

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0104 ]--