File: 18-filter.t

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 (26 lines) | stat: -rw-r--r-- 642 bytes parent folder | download | duplicates (3)
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
26
use strict;
use warnings;

use Test::More tests => 2;
use SVG;

# test: fe

my $svg    = SVG->new;
my $parent = $svg->group();
my $child1 = $parent->text->cdata("I am the first child");
my $child2 = $parent->text->cdata("I am the second child");
my $fe     = $svg->fe(
    -type => 'diffuselighting',    # required - element name omitting 'fe'
    id    => 'filter_1',
    style => {
        'font'      => [qw(Arial Helvetica sans)],
        'font-size' => 10,
        'fill'      => 'red',
    },
    transform => 'rotate(-45)'
);

ok( $fe, "fe 1: generation" );
my $out = $svg->xmlify;
like( $out, qr/feDiffuseLighting/, "fe 2: result" );