App-Guiio
view release on metacpan or search on metacpan
Author: nadim khemir <nadim@hp.(none)>
Date: Sat May 3 15:15:37 2008 +0200
FIXED: diagonal to non-diagonal section connection
CHANGED: refactored non-diagonal connection code
commit ac24a1ea8ba1eb907e562cc93b741bf9c21ca724
Author: nadim khemir <nadim@hp.(none)>
Date: Fri May 2 21:41:18 2008 +0200
CHANGED: refactored intersection overlay code
commit e0cbcdb5c36e8988dfe1bbdcd35a8692f3f09567
Author: nadim khemir <nadim@hp.(none)>
Date: Fri May 2 21:21:27 2008 +0200
FIXED: diagonal arrows connector overlay
commit 5496f3823605735bc5e72b1744dbb991418d76ab
Author: nadim khemir <nadim@naquadim.(none)>
Date: Fri May 2 10:25:28 2008 +0200
ADDED: ruler context menu entry
commit 19f188b707c16e8c08a4861fcdb57f5e37211ae8
Author: nadim khemir <nadim@naquadim.(none)>
Date: Fri May 2 02:04:07 2008 +0200
commit d7441253720c02741722f1f9ed4b185ce5e1f34d
Author: nadim khemir <nadim@naquadim.(none)>
Date: Tue Apr 15 09:56:45 2008 +0200
ADDED: dump of actions per file (for user help and document generation)
commit e6e758fd15a725138de0f6195e81fe8e04186a01
Author: nadim khemir <nadim@naquadim.(none)>
Date: Tue Apr 15 07:59:24 2008 +0200
FIXED: multi wirl inter-sections overlays error when the arrow backtracked on itself
commit 1e25b671042386f1070d5b454b714a064c3d0c94
Author: nadim khemir <nadim@naquadim.(none)>
Date: Tue Apr 15 07:53:23 2008 +0200
FIXED: moving connectors on each other bugs the connector size
commit 0e9e6402ed2684bc572fab38c74fbcef9d9f2448
Author: nadim khemir <nadim@naquadim.(none)>
Date: Mon Apr 14 11:39:43 2008 +0200
FIXED: multi wirl inter-sections overlays should be taken from the arrow definition
commit 3eca833a47fa621560c637f2a75c305f2f8608ae
Author: nadim khemir <nadim@naquadim.(none)>
Date: Mon Apr 14 10:29:26 2008 +0200
FIXED: added section connects automatically
commit b0a8e3cd026aff7680a9da666e29c50b8429e02c
Author: nadim khemir <nadim@naquadim.(none)>
Date: Mon Apr 14 10:05:20 2008 +0200
#register_action_handlers return own data not the evaled package
#script to generate a list of the actions available
#error: |------------>
#error: moving connectors on each other bugs the connector size
only when end connector is backed over start connector
#error: multi wirl inter-sections overlays should be taken from the arrow definition
# .####
| #
#####-##
#direction change should work on any arrow section
#error: Add section keeps connection
#error: Add section doesn't connect
# multi wirl extension as if we were drawing the arrow
lib/App/Guiio/stripes/section_wirl_arrow.pm view on Meta::CPAN
['upright', '|', '|', '.', '-', '>', 1],
['rightup', '-', '-', '\'', '|', '^', 1],
['downright', '|', '|', '\'', '-', '>', 1],
['rightdown', '-', '-', '.', '|', 'v', 1],
['45', '/', '/', '', '', '^', 1, ],
['135', '\\', '\\', '', '', 'v', 1, ],
['225', '/', '/', '', '', 'v', 1, ],
['315', '\\', '\\', '', '', '^', 1, ],
] ;
# constants for connector overlays
Readonly my $body_index => 2 ;
Readonly my $connection_index => 3 ;
Readonly my $up_index=> 1 ;
Readonly my $left_index=> 3 ;
Readonly my $leftup_index => 5 ;
Readonly my $leftdown_index => 7 ;
sub new
{
lib/App/Guiio/stripes/section_wirl_arrow.pm view on Meta::CPAN
) ;
}
else
{
die "Bad 'section wirl arrow' defintion! Expecting points array." ;
}
}
#-----------------------------------------------------------------------------
my %diagonal_direction_to_overlay_character =
(
(map {$_ => q{\\}} qw( down-right right-down up-left left-up)),
(map {$_ => q{/}} qw( down-left left-down up-right right-up)),
) ;
my %diagonal_non_diagonal_to_overlay_character =
(
(map {$_ => q{.}} qw( down-right right-down up-left left-up)),
(map {$_ => q{'}} qw( down-left left-down up-right right-up)),
) ;
sub get_mask_and_element_stripes
{
my ($self) = @_ ;
my @mask_and_element_stripes ;
lib/App/Guiio/stripes/section_wirl_arrow.pm view on Meta::CPAN
if($self->{ALLOW_DIAGONAL_LINES} && $arrow->{WIDTH} == $arrow->{HEIGHT})
{
# this arrow is diagonal
if
(
$previous_was_diagonal
&& ($previous_was_diagonal eq $arrow->{DIRECTION} || $previous_was_diagonal eq "$d2-$d1")
)
{
# two diagonals going in the same direction
$connection = $diagonal_direction_to_overlay_character{$arrow->{DIRECTION}} ;
}
else
{
# previous non diagonal or two diagonals not going in the same direction
$connection = ($d1 eq 'up' || $d2 eq 'up') ? q{'} : q{.} ;
}
$previous_was_diagonal = $arrow->{DIRECTION} ;
}
else
lib/App/Guiio/stripes/section_wirl_arrow.pm view on Meta::CPAN
}
}
}
$previous_direction = defined $d2 ? $d2 : $d1 ;
$previous_was_diagonal = undef ;
}
if($arrow_index != 0 && defined $connection) # first character of the first section is always right
{
# overlay the first character of this arrow
push @mask_and_element_stripes,
{
X_OFFSET => $self->{POINTS_OFFSETS}[$arrow_index][0],
Y_OFFSET => $self->{POINTS_OFFSETS}[$arrow_index][1],
WIDTH => 1,
HEIGHT => 1,
TEXT => $connection,
} ;
}
( run in 0.794 second using v1.01-cache-2.11-cpan-49f99fa48dc )