[guest - Mon Jan 13 23:51:13 2003]:
Show quoted text> i've made a simple patch that accomplishes this which is attached.
...but which works only in special situations. i've fixed this,
but the fix became more elaborate than hoped.
net result: one new possible attribute for <point>: bullet.
if not set at all or value != 0 -> bulleting on. otherwise no bullets.
a patch (better tested this time, i swear!) is attached.
regards
az
--- AxPoint.pm.orig Tue Jun 11 17:39:24 2002
+++ AxPoint.pm Wed Feb 5 18:05:58 2003
@@ -122,7 +122,9 @@
my $transition = $trans || $self->get_transition || 'replace';
$transition = 'replace' if $transition eq 'none';
+# warn "axpoint new page transition : $transition";
$transition = 'replace' if $self->{PrintMode};
+# warn "axpoint new page after PrintMode transition : $transition";
$self->{pdf}->set_parameter(transition => lc($transition));
@@ -509,11 +511,11 @@
}
sub bullet {
- my ($self, $level) = @_;
+ my ($self, $level, $bulleton) = @_;
my $pdf = $self->{pdf};
-
my ($char, $size);
+
if ($level == 1) {
$char = "l";
$size = 18;
@@ -522,7 +524,7 @@
$char = "u";
$size = 16;
}
- elsif ($level == 3) {
+ elsif ($level >= 3) {
$char = "p";
$size = 14;
}
@@ -541,9 +543,10 @@
}
$pdf->set_font(face => "ZapfDingbats", size => $size - 4, encoding => "builtin");
- $pdf->print($char);
+ $pdf->print(($bulleton?$char:" "));
$pdf->set_font(face => $self->{normal_font}, size => $size);
$pdf->print(" ");
+
return $size;
}
@@ -769,6 +772,7 @@
# warn("slide_start_ $name\n");
# transitions...
+# warn "axpoint: Am I in PrintMode? ".$self->{PrintMode};
if ( (!$self->{PrintMode}) &&
$name =~ /^(point|image|source[_-]code|table|col|row|circle|ellipse|rect|text|line|path)$/) {
if (exists($el->{Attributes}{"{}transition"})
@@ -779,6 +783,7 @@
if ( (!$trans) && ($name ne 'table') && ($name ne 'row') && ($name ne 'col') ) {
$trans = { Value => $self->{default_transition}[0] };
}
+ warn "axpoint: trans = $trans";
if ($trans && ($trans->{Value} ne 'none') ) {
my @cache = @{$self->{cache_trash}};
local $self->{cache} = \@cache;
@@ -808,6 +813,7 @@
$self->{colour_stack} = [[0,0,0]];
# if we do bullet/image transitions, make sure new pages don't use a transition
$el->{Attributes}{"{}transition"}{Value} = "replace";
+# warn "axpoint setting it to replace";
$self->{extents} = [{ x => 0, w => 612 }];
}
elsif ($name eq 'title') {
@@ -890,6 +896,7 @@
elsif ($name eq 'point') {
$self->{chars_ok} = 1;
my $level = $el->{Attributes}{"{}level"}{Value} || 1;
+ my $bulleton=(exists($el->{Attributes}{"{}bullet"})?$el->{Attributes}{"{}bullet"}{Value}:1);
my ($x, $y) = $self->{pdf}->get_text_pos;
if (@{$self->{xindent}} && $level <= $self->{xindent}[0]{level}) {
@@ -908,7 +915,7 @@
$self->{pdf}->set_text_pos($self->{extents}[0]{x} + $indent, $y);
}
- my $size = $self->bullet($level);
+ my $size = $self->bullet($level,$bulleton);
($x, $y) = $self->{pdf}->get_text_pos;
# warn(sprintf("creating new bb: %s => %d, %s => %d, %s => %d, %s => %d",