Skip to content

Commit 4743a7e

Browse files
committed
Minor corrections
1 parent d170d8a commit 4743a7e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

9a-cairo-drawing.pl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use constant PI => 3.1415927;
1111

1212
my $window = Gtk3::Window->new('toplevel');
13-
$window->set_title("Grid Example");
13+
$window->set_title("Cairo Basics");
1414
$window->set_position("mouse");
1515
$window->set_default_size(600, 400);
1616
$window->set_border_width(5);
@@ -51,7 +51,7 @@ sub cairo_draw {
5151
$context->arc( 220, 150, 100, 0, PI * 2 );
5252
$context->set_line_width(10);
5353
$context->stroke_preserve;
54-
$context->set_source_rgba(0.9, 0.2, 0.2, 0.2);
54+
$context->set_source_rgba(0.9, 0.2, 0.2, 0.2);
5555
$context->fill;
5656

5757
# Segment
@@ -78,16 +78,16 @@ sub cairo_draw {
7878
$context->move_to(50, 50);
7979
$context->line_to(550, 350);
8080
$context->stroke;
81-
81+
8282
# Curve
8383
$context->set_line_width(10);
84-
$context->set_source_rgba(0.9, 0.9, 0, 0.9);
84+
$context->set_source_rgba(0.9, 0.9, 0, 0.9);
8585
$context->move_to(50, 50);
8686
$context->curve_to( 100, 250, 250, 150, 550, 350);
8787
$context->stroke;
8888

8989
# Text
90-
$context->set_source_rgba(0.0, 0.9, 0.9, 0.7);
90+
$context->set_source_rgba(0.0, 0.9, 0.9, 0.7);
9191
$context->select_font_face( "Sans", "normal", "bold" );
9292
$context->set_font_size( 50 );
9393
$context->move_to(220, 50);
@@ -98,7 +98,7 @@ sub cairo_draw {
9898
$context->text_path( "pretty" );
9999
$context->set_source_rgba(0.9, 0, 0.9, 0.7);
100100
$context->fill_preserve;
101-
$context->set_source_rgba(0.2, 0.1, 0.1, 0.7);
101+
$context->set_source_rgba(0.2, 0.1, 0.1, 0.7);
102102
$context->set_line_width( 2 );
103103
$context->stroke;
104104

Perl Gtk3 Tutorial.odt

3.83 KB
Binary file not shown.

Perl Gtk3 Tutorial.pdf

-24.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)