~ubuntu-branches/debian/experimental/cuneiform/experimental

« back to all changes in this revision

Viewing changes to cuneiform_src/Kern/lns32/src/sbambuk.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-07-10 17:58:10 UTC
  • Revision ID: james.westby@ubuntu.com-20090710175810-rqc89d2i3tki9m89
Tags: upstream-0.7.0+dfsg
ImportĀ upstreamĀ versionĀ 0.7.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright (c) 1993-2008, Cognitive Technologies
 
3
All rights reserved.
 
4
 
 
5
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½,
 
6
ļæ½ļæ½ļæ½ ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½:
 
7
 
 
8
      * ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
 
9
        ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
 
10
        ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½.
 
11
      * ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½
 
12
        ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
 
13
        ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½
 
14
        ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½.
 
15
      * ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ Cognitive Technologies, ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½
 
16
        ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
 
17
        ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½, ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
 
18
        ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½.
 
19
 
 
20
ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ "ļæ½ļæ½ļæ½
 
21
ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½" ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½-ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½,
 
22
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ ļæ½ļæ½
 
23
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½. ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
 
24
ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½
 
25
ļæ½ļæ½ŃØļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½
 
26
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
 
27
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ (ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½,
 
28
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½-ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½
 
29
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½/ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½,
 
30
ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½), ļæ½ļæ½ ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½, ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½
 
31
ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½ ļæ½ ļæ½ļæ½ļæ½ļæ½ļæ½ļæ½.
 
32
 
 
33
Redistribution and use in source and binary forms, with or without modification,
 
34
are permitted provided that the following conditions are met:
 
35
 
 
36
    * Redistributions of source code must retain the above copyright notice,
 
37
      this list of conditions and the following disclaimer.
 
38
    * Redistributions in binary form must reproduce the above copyright notice,
 
39
      this list of conditions and the following disclaimer in the documentation
 
40
      and/or other materials provided with the distribution.
 
41
    * Neither the name of the Cognitive Technologies nor the names of its
 
42
      contributors may be used to endorse or promote products derived from this
 
43
      software without specific prior written permission.
 
44
 
 
45
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 
46
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 
47
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 
48
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
 
49
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
50
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 
51
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 
52
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 
53
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 
54
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
55
*/
 
56
 
 
57
        /*
 
58
        Getting source bitmap and creating horisontal and vertical
 
59
        segments page bambuks simultaneously.
 
60
 
 
61
        Entry point is constructor
 
62
                THVSegBambuk( PTBMPReadBuffer reader, int h_filter_len, int v_filter_len  ).
 
63
 
 
64
        09-06-93 05:43pm, Basil
 
65
        */
 
66
 
 
67
        #ifndef __SBAMBUK_H
 
68
        #       define __SBAMBUK_H
 
69
 
 
70
   #ifndef __LNSLANG_H
 
71
   #  include "lnslang.h"
 
72
        #endif
 
73
 
 
74
 
 
75
//      _TYPEDEFFAR( TBlackSeg   )
 
76
//      _TYPEDEFFAR( TSegBambuk  )
 
77
//      _TYPEDEFFAR( THVSegBambuk)
 
78
   #ifndef __BAMBUK_H
 
79
        #       include "bambuk.h"
 
80
        #endif
 
81
        #ifndef __XYDIM_H
 
82
        #       include "xydim.h"
 
83
        #endif
 
84
        #ifndef __ERROBJ_H
 
85
        #       include "errobj.h"
 
86
        #endif
 
87
   #ifndef __TGREADER_H    // under windows tiger lib
 
88
   #  include "tgreader.h"
 
89
   #endif
 
90
 
 
91
   #ifndef __PROCLINE_H
 
92
        #       include "procline.h"
 
93
        #endif
 
94
        #ifndef __FLTBUF_H
 
95
        #       include "fltbuf.h"
 
96
        #endif
 
97
 
 
98
        #ifndef __PARALINE_H
 
99
        #       include "paraline.h"
 
100
        #endif
 
101
 
 
102
        #define H_FLT_LEN  (int)16
 
103
//      #define V_FLT_LEN  (int)16
 
104
 
 
105
 
 
106
/*
 
107
*  TBlackSeg **********************************************
 
108
 
 
109
        Simple black segment (or "interval") of bitmap line
 
110
 
 
111
*/
 
112
 
 
113
struct TBlackSeg
 
114
        {
 
115
int left;
 
116
int right;
 
117
BHandle dashHandle;  // handle of proper component dash
 
118
BHandle nLower;         // link to lower segments in raster line
 
119
                                                        // this is indexes of proper Bambuk array elements
 
120
        };
 
121
 
 
122
typedef TBlackSeg * FarBlackSeg;
 
123
 
 
124
/*
 
125
*  TSegBambuk **********************************************
 
126
 
 
127
        TSegBambuk is bambuk of bitmap rows(or columns) of BlackSegments
 
128
        Has some methods of building which differs for horisontal and
 
129
        vertical cases.
 
130
 
 
131
        Objects of this class used as source when RasterBambuk is builded
 
132
        (no matter was this SegBambuk object created by vertical or
 
133
        horisontal methods)
 
134
*/
 
135
 
 
136
class TSegBambuk :
 
137
        //public TBambuk< TBlackSeg >
 
138
        public THugeBambuk< TBlackSeg >
 
139
{
 
140
        private:
 
141
                        BHandle curHEntry;
 
142
                        int segLimit;
 
143
public:
 
144
BHandle segCount;
 
145
 
 
146
TSegBambuk( void ):
 
147
                                THugeBambuk< TBlackSeg >(),
 
148
                                //TBambuk< TBlackSeg >(),
 
149
                                curHEntry(0),
 
150
                                segLimit(0),
 
151
                                segCount(0)
 
152
                                {};
 
153
 
 
154
TSegBambuk( BHandle max_members, BEntry max_entries ):
 
155
                                THugeBambuk< TBlackSeg >(max_members, max_entries),
 
156
                                //TBambuk< TBlackSeg >(max_members, max_entries),
 
157
                                curHEntry(0),
 
158
                                segLimit(0),
 
159
                                segCount(0)
 
160
                                {};
 
161
 
 
162
Bool isOk( void )
 
163
        {
 
164
        return (THugeBambuk< TBlackSeg >::isOk());
 
165
                //return (TBambuk< TBlackSeg >::isOk());
 
166
        };
 
167
 
 
168
        /** horisontal building routines **/
 
169
void hInitProcess( int left, int right, int h_filter_len )
 
170
                        {
 
171
            SetupHConverter( left, right, h_filter_len, (TSegBambuk*)this, TRUE);
 
172
                                curHEntry = 0;
 
173
                                segLimit = (right - left + 1) / (h_filter_len+1);
 
174
                        };
 
175
 
 
176
Bool hUpdate( void* new_line )
 
177
                        {
 
178
            assert( segLimit );
 
179
                                if (memberRestCount() < segLimit)
 
180
            {
 
181
 
 
182
               if (!GrowMembers())
 
183
                  return WRONG();
 
184
                                   if (memberRestCount() < segLimit)
 
185
                  return WRONG();
 
186
            }
 
187
                                ConvertBWLine( new_line );
 
188
                                curHEntry++;
 
189
                                return TRUE;
 
190
                        };
 
191
 
 
192
void addHorisontal( Int32 left, Int32 right )
 
193
                        {
 
194
                                BHandle new_member = addMember( curHEntry );
 
195
                                segCount++;
 
196
 
 
197
            //========================= 06-21-95 02:27pm, just for optimization
 
198
                                TBlackSeg & bs = ((*this)[new_member]);
 
199
            bs.left = left;
 
200
            bs.right = right;
 
201
            bs.dashHandle = NULLBHandle;
 
202
            bs.nLower = NULLBHandle;
 
203
            //========================= 06-21-95 02:27pm ======================
 
204
            /**
 
205
                                THIS[new_member].left = left;
 
206
                                THIS[new_member].right = right;
 
207
                                THIS[new_member].dashHandle = NULLBHandle;
 
208
                                THIS[new_member].nLower = NULLBHandle;
 
209
             **/
 
210
                        };
 
211
 
 
212
        /** vertical building routines **/
 
213
Bool /*TSegBambuk::*/vUpdate(  Int32* new_line,
 
214
                           Int32* cur16,
 
215
                           Int32* prev16,
 
216
                                                                        int cur_row
 
217
        //                                                                      int width_dword ??
 
218
                                                                );
 
219
Bool /*TSegBambuk::*/vUpdateFirst(   Int32* new_line,
 
220
                                 Int32* cur16,
 
221
                                                                                        int cur_row       // at this version == 16
 
222
                                                                                );
 
223
Bool /*TSegBambuk::*/vUpdateLast(    Int32* cur16,
 
224
                                 Int32* last16,
 
225
                                                                                        int bottom_row
 
226
                                                                                );
 
227
 
 
228
};
 
229
 
 
230
 
 
231
/*
 
232
*  THVSegBambuk **********************************************
 
233
 
 
234
        THVSegBambuk object associates vertical and horisontal TSegBambuk's of
 
235
        the bitmap.
 
236
        Main feature is simultaneous creating of horisontal and vertical
 
237
        vertions of TSegBambuk's objects        by single pass of source bitmap
 
238
 
 
239
        After HVBambuk has builded horisontal and vertical rasters can be
 
240
        processed independently.
 
241
 
 
242
*/
 
243
 
 
244
class THVSegBambuk : public TXYDim, public TErrObj
 
245
        {
 
246
public :
 
247
      int xres, yres;
 
248
TSegBambuk      hBambuk;      // "bambuk" of horisontal segments
 
249
TSegBambuk      vBambuk;      // "bambuk" of vertical segments
 
250
        private:
 
251
#ifdef __TGREADER_H   // 01-29-94 04:19pm, Basil
 
252
public:
 
253
THVSegBambuk( TigerReader & reader );
 
254
private:
 
255
      Bool        makeIt(  TigerReader * reader,
 
256
                                                                   TFltBuf*   filter
 
257
                                                                );
 
258
#endif //__TGREADER_H
 
259
 
 
260
   }; // THVSegBambuk
 
261
 
 
262
        #endif // __SBAMBUK_H