Date: Friday December 28, 2001 @ 23:14
Author: matt
Update of /home/cvs/AxKit/lib/Apache/AxKit/Language
In directory ted:/home/matt/Perl/AxKit/lib/Apache/AxKit/Language
Modified Files:
AxPoint.pm
Log Message:
Allow bullet point transitions
Clear transition on each slide if not set
Index: AxPoint.pm
===================================================================
RCS file: /home/cvs/AxKit/lib/Apache/AxKit/Language/AxPoint.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- AxPoint.pm 2001/12/11 11:20:17 1.10
+++ AxPoint.pm 2001/12/28 23:14:02 1.11
@@ -1,4 +1,4 @@
-# $Id: AxPoint.pm,v 1.10 2001/12/11 11:20:17 matt Exp $
+# $Id: AxPoint.pm,v 1.11 2001/12/28 23:14:02 matt Exp $
package Apache::AxKit::Language::AxPoint;
@@ -103,11 +103,11 @@
AxKit::Debug(7, "AxPoint: Creating new_page sub");
my $new_page = sub {
- my ($node) = @_;
+ my ($node, $trans) = @_;
$pdf->start_page;
- my $transition = $node->findvalue('ancestor-or-self::node()/@transition');
+ my $transition = $trans ||
+$node->findvalue('ancestor-or-self::*/@transition') || 'replace';
$pdf->set_parameter("transition", lc($transition)) if $transition;
@@ -203,7 +203,7 @@
}
sub process_slide {
- my ($pdf, $new_page, $slide, $parent_bookmark) = @_;
+ my ($pdf, $new_page, $slide, $parent_bookmark, $do_up_to) = @_;
$pdf->end_page;
my @images;
@@ -214,10 +214,18 @@
);
}
- $new_page->($slide);
+ if ($do_up_to) {
+ my @nodes = $slide->findnodes("point|source_code|image");
+ my $do_to_node = $nodes[$do_up_to - 1];
+ $new_page->($slide, $do_to_node->findvalue('@transition'));
+ }
+ else {
+ $new_page->($slide);
+ }
+
my $h = 300;
if (my $title = $slide->findvalue("title")) {
- $pdf->add_bookmark(text => $title, level => 3, parent_of => $parent_bookmark);
+ $pdf->add_bookmark(text => $title, level => 3, parent_of => $parent_bookmark)
+unless $do_up_to;
$pdf->set_font(face => "Helvetica", size => 24);
$pdf->print_boxed($title, x => 20, y => 350,
w => 570, h => 70, mode => "center");
@@ -225,7 +233,17 @@
}
$pdf->set_text_pos(60, $h);
+
+ my $new_do_up_to = 1;
foreach my $item ($slide->findnodes("point|source_code|image")) {
+ if (!$do_up_to && $item->findvalue('@transition')) {
+ process_slide($pdf, $new_page, $slide, $parent_bookmark, $new_do_up_to);
+ }
+
+ if ($do_up_to) {
+ last if $do_up_to == $new_do_up_to;
+ }
+
if ($item->getName eq "point") {
point($pdf, $item->findvalue('@level') || 1, $item->string_value);
}
@@ -235,6 +253,8 @@
elsif ($item->getName eq 'image') {
image($pdf, $item->getAttribute('scale') || 1, shift @images);
}
+
+ $new_do_up_to++;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]