/[opencvs]/eyes/enl_draw_lines.pl
ViewVC logotype

Contents of /eyes/enl_draw_lines.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Sat Apr 28 09:50:55 2012 UTC (6 years, 6 months ago) by hib
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
got enlightenment_pattern sorta working, but it crashes when you have 32
open images sometimes cause of the darn memory.
So I will see if I can put a -limit on it programatically.
1 #
2 # This draws lines to make sure we have the right loading
3
4
5 $eh = $ENV{ENLIGHTENMENT_HOME};
6 $common = "$eh/common";
7
8
9 @top = &readit("$common/top_points.txt");
10 @bottom = &readit("$common/bottom_points.txt");
11 @l08 = &readit("$common/l08_points.txt");
12 @l16 = &readit("$common/l16_points.txt");
13 @l24 = &readit("$common/l24_points.txt");
14 @left = &readit("$common/left_points.txt");
15 @right = &readit("$common/right_points.txt");
16 $a .= "-fill none -stroke white \\\n";
17
18
19
20 for ($i=1;$i<32;$i++) {
21 $l = $left[$i];
22 $l08 = $l08[$i];
23 $l16 = $l16[$i];
24 $l24 = $l24[$i];
25 $r = $right[$i];
26 $x00 = (0,0);
27 $x08 = &lint($top[8],$bottom[8],$l08,18000);
28 $x16 = &lint($top[16],$bottom[16],$l16,18000);
29 $x24 = &lint($top[24],$bottom[24],$l24,18000);
30 $a .= "-draw \"line 0,$l,$x08,$l08\" \\\n";
31 $a .= "-draw \"line $x08,$l08,$x16,$l16\" \\\n";
32 $a .= "-draw \"line $x16,$l16,$x24,$l24\" \\\n";
33 $a .= "-draw \"line $x24,$l24,17999,$r\" \\\n";
34 }
35
36 $a .= "-stroke white \\\n";
37 for ($i=1;$i<32;$i++) {
38 $t = $top[$i];
39 $b = $bottom[$i];
40 $a .= "-draw \"line $t,0,$b,17999\" \\\n";
41 }
42
43 print "convert -limit memory 6000000000 -limit map 6000000000 base18k.bmp $a lined.png\n";
44
45
46 sub readit {
47 my ($filename) = @_;
48 my @var;
49 open(X,"$filename");
50 while (<X>) {
51 my $r = $_;
52 chomp($r);
53 push(@var,$r);
54 }
55 return @var;
56 }
57
58
59 sub lint {
60 my ($f,$t,$pos,$size) = @_;
61 my ($x);
62 $x = $f + ($t-$f) * $pos / $size;
63 return $x;
64 }

  ViewVC Help
Powered by ViewVC 1.1.5