[ Avaa Bypassed ]




Upload:

Command:

www-data@3.148.239.85: ~ $
#!/usr/bin/perl

use strict;
use warnings;
use Cairo;

use constant
{
	WIDTH => 450,
	HEIGHT => 900,
	NUM_STRINGS => 3,
	M_PI => 4 * atan2(1, 1),
};

{
	my $surface = Cairo::ImageSurface->create ('argb32', WIDTH, HEIGHT);
	my $cr = Cairo::Context->create ($surface);

	$cr->set_source_rgb (0.0, 0.0, 0.0);

	$cr->translate (40, 40);

	$cr->select_font_face ('mono', 'normal', 'normal');
	$cr->set_font_size (12);
	$cr->show_text ('+CTM rotation');

	$cr->save;
	$cr->select_font_face ('serif', 'normal', 'normal');
	$cr->set_font_size (40);
	for (my $i = 0; $i < NUM_STRINGS; $i++) {
		my $angle = $i * 0.5 * M_PI / (NUM_STRINGS - 1);
		$cr->save;
		$cr->rotate ($angle);
		$cr->move_to (100, 0);
		$cr->show_text ("Text");
		$cr->restore;
	}
	$cr->restore;

	$cr->translate (0, HEIGHT / 3);

	$cr->move_to (0, 0);
	$cr->show_text ('+CTM rotation');
	$cr->rel_move_to (0, 12);
	$cr->show_text ('-font rotation');

	$cr->save;
	$cr->select_font_face ('serif', 'normal', 'normal');
	$cr->set_font_size (40);
	for (my $i = 0; $i < NUM_STRINGS; $i++) {
		my $angle = $i * 0.5 * M_PI / (NUM_STRINGS - 1);
		$cr->save;
		$cr->rotate ($angle);
		my $matrix = Cairo::Matrix->init_identity;
		$matrix->scale (40, 40);
		$matrix->rotate (-$angle);
		$cr->set_font_matrix ($matrix);
		$cr->move_to (100, 0);
		$cr->show_text ('Text');
		$cr->restore;
	}
	$cr->restore;

	$cr->translate (0, HEIGHT / 3);

	$cr->move_to (0, 0);
	$cr->show_text ('+CTM rotation');
	$cr->rel_move_to (0, 12);
	$cr->show_text ('-CTM rotation');

	$cr->save;
	$cr->select_font_face ('serif', 'normal', 'normal');
	$cr->set_font_size (40);
	for (my $i = 0; $i < NUM_STRINGS; $i++) {
		my $angle = $i * 0.5 * M_PI / (NUM_STRINGS - 1);
		$cr->save;
		$cr->rotate ($angle);
		$cr->move_to (100, 0);
		$cr->rotate (-$angle);
		$cr->show_text ('Text');
		$cr->restore;
	}
	$cr->restore;

	$surface->write_to_png ('text-rotate.png');
}

Filemanager

Name Type Size Permission Actions
README File 165 B 0644
bevels.pl File 6 KB 0644
caps_joins.pl File 1.41 KB 0644
hering.pl File 1.15 KB 0644
outline.pl File 2.07 KB 0644
snapping.pl File 9.08 KB 0644
spiral.pl File 895 B 0644
spline-pipeline.pl File 2.46 KB 0644
splines_tolerance.pl File 1018 B 0644
star_and_ring.pl File 4.63 KB 0644
stars.pl File 1.06 KB 0644
text-rotate.pl File 1.85 KB 0644
text.pl File 3.12 KB 0644