File: ellipse.pl

package info (click to toggle)
libsvg-perl 2.87-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 464 kB
  • sloc: perl: 2,789; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 439 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use strict;
use warnings;
use 5.010;

use SVG;

# create an SVG object
my $svg= SVG->new( width => 200, height => 200);

my $tag = $svg->ellipse(
    cx => 10,
    cy => 10,
    rx => 5,
    ry => 7,
    id => 'ellipse',
    style => {
        'stroke'         => 'red',
        'fill'           => 'green',
        'stroke-width'   => '4',
        'stroke-opacity' => '0.5',
        'fill-opacity'   => '0.2',
    }
);
say $svg->xmlify;