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

Software: Apache/2.2.16 (Debian). PHP/5.3.3-7+squeeze19 

uname -a: Linux mail.tri-specialutilitydistrict.com 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC
2014 x86_64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/doc/libpango-perl/examples/   drwxr-xr-x
Free 129.89 GB of 142.11 GB (91.4%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     cairo-simple.pl (1.75 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl

# This is adopted from the cairosimple.c example in the pango distribution
# written by Behdad Esfahbod.

use strict;
use warnings;

use Math::Trig qw(pi);
use Cairo;
use Glib qw(TRUE FALSE);
use Gtk2 -init;
use Gtk2::Pango;

use constant RADIUS => 150;
use constant N_WORDS => 10;
use constant FONT => "Sans Bold 27";

sub draw_text {
  my ($cr) = @_;

  $cr -> translate(RADIUS, RADIUS);

  my $layout = Pango::Cairo::create_layout($cr);
  $layout -> set_text("Text");

  my $desc = Pango::FontDescription -> from_string(FONT);
  $layout -> set_font_description($desc);

  # Draw the layout N_WORDS times in a circle
  foreach (0 .. N_WORDS) {
    my $angle = (360. * $_) / N_WORDS;

    $cr -> save();

    # Gradient from red at angle == 60 to blue at angle == 300
    my $red = (1 + cos(($angle - 60) * pi / 180.)) / 2;
    $cr -> set_source_rgb($red, 0, 1.0 - $red);

    $cr -> rotate($angle * pi / 180.);

    # Inform Pango to re-layout the text with the new transformation
    Pango::Cairo::update_layout($cr, $layout);

    my ($width, $height) = $layout -> get_size();
    $cr -> move_to(- ($width / PANGO_SCALE) / 2, - RADIUS);
    Pango::Cairo::show_layout($cr, $layout);

    $cr -> restore();
  }
}

my $window = Gtk2::Window -> new();
$window -> signal_connect(delete_event => sub { Gtk2 -> main_quit(); });

my $area = Gtk2::DrawingArea -> new();
$area -> signal_connect(expose_event => sub {
  my ($widget, $event) = @_;

  my $cr = Gtk2::Gdk::Cairo::Context -> create($widget -> window());
  $cr -> set_source_rgb(1.0, 1.0, 1.0);
  $cr -> rectangle(0, 0, 2 * RADIUS, 2 * RADIUS);
  $cr -> fill();

  draw_text($cr);

  return FALSE;
});

$window -> set_default_size(2 * RADIUS, 2 * RADIUS);
$window -> add($area);
$window -> show_all();

Gtk2 -> main();

:: 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.0137 ]--