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

« back to all changes in this revision

Viewing changes to cuneiform_src/Kern/rselstr/sources/src/chstr/h/puttocstr.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
#include <stdio.h>
 
58
/*#include <windows.h>*/
 
59
#include <math.h>
 
60
#include<time.h>
 
61
 
 
62
#include "lhstr.h"
 
63
#include "ccom.h"
 
64
#include "ctiimage.h"
 
65
#include "recdefs.h"
 
66
#include "rstr.h"
 
67
#include "dpuma.h"
 
68
#include "cpage.h"
 
69
#include "cstr.h"
 
70
#include "exc.h"
 
71
#include "criimage.h"
 
72
#include "evn.h"
 
73
 
 
74
/*----------------------------------------------------------------------------*/
 
75
 
 
76
//���������
 
77
extern int inf_str_h;
 
78
extern int inf_str_w;
 
79
extern double cut_white;
 
80
extern double cut_str;
 
81
 
 
82
 
 
83
 
 
84
/*----------------------------------------------------------------------------*/
 
85
//���������
 
86
 
 
87
 
 
88
extern CLhstr* list;
 
89
extern CLPrepHstr* prelist;
 
90
extern Handle MainWindowD;
 
91
extern Handle StrD;
 
92
extern Handle Root;
 
93
 
 
94
#define TYPE_RSELSTR_TEMP_PHSTR CPAGE_GetInternalType("TYPE_RSELSTR_TEMP_PHSTR")
 
95
#define TYPE_RNEG_TEMP_PHSTR CPAGE_GetInternalType("TYPE_RNEG_TEMP_PHSTR")
 
96
 
 
97
/*-------------------------------------------------------------------------------------*/
 
98
 
 
99
void CleanCont(void);
 
100
BOOL StrGetRaster(Handle,Word8*,Rect16,CCOM_comp*,RecRaster*,BOOL,BOOL,int);
 
101
void StrAr2(Word8*,int,int);
 
102
BOOL GetMasP(Handle,Word8*,Rect16,Word8**);
 
103
void Invert(RecRaster*);
 
104
int MyGetMaxFragment(int);
 
105
void StrDrawRect(Handle,Word32,Word32,Rect16);
 
106
void Invert(Rect16*,Word8*);
 
107
void CopyP(Rect16*,Word8*,Word8*);
 
108
void ToHorizont(Rect16*,Word8*,Word8*);
 
109
BOOL IfNewStr(Word8*,int,int,int,int,int&,int);
 
110
void StrDrawRect(Handle,Word32,Word32,Rect16*,int,BOOL,Rect16);
 
111
void SortLetter(CCOM_comp** ppComp,int,BOOL);
 
112
void StrMoveMas(Rect16*,int&,int);
 
113
void StrMoveMas(int*,int&,int);
 
114
void StrMoveMas(CCOM_comp**,int&,int);
 
115
void StrMoveMasR(Rect16*,int&,int);
 
116
int IfStr(Rect16*,int,BOOL);
 
117
BOOL GetMasP(Handle,Word8*,Rect16,Word8**);
 
118
Handle GetStrCCOM(Handle,Word8*,Rect16,BOOL,BOOL);
 
119
BOOL InitStrMas(Rect16**,int);
 
120
BOOL InitStrMas(CCOM_comp***,int);
 
121
void InitRc(Rect16*,int,CCOM_comp *);
 
122
//void DelStrMas(Rect16*);
 
123
void DelStrMas(Rect16**);
 
124
void DelStrMas(CCOM_comp**);
 
125
BOOL AddLenStrMas(Rect16**,int&,int);
 
126
BOOL AddLenStrMas(CCOM_comp***,int&,int);
 
127
BOOL MyRotateImage(Word8*,Word8*,int,Rect16*,BOOL,int,MATRIX*,MATRIX*);
 
128
void InitRotateImageName(Word8*,Word8*);
 
129
void InitRotateImageName(Word8*,int);
 
130
void GetRasterRect(Word8*,Rect16,Rect16*,CSTR_attr*,BOOL);
 
131
int GetStrScale(Rect16*,int,BOOL);
 
132
void CleanStr(Rect16*,int&,int,int,int,int,int,BOOL);
 
133
BOOL InitRotateMas(Rect16,Int16**,Int16**,Word8**);
 
134
BOOL InitRotateMas(int**,int);
 
135
void DeleteRotateMas(Int16*,Int16*,Word8*,int*);
 
136
Bool32 Filter(Int32,Int32,Int32,Int32);
 
137
int GetStrW(Word8*,int,int,int,int,int&,int&);
 
138
int GetMediumSize(CCOM_handle,Rect16,int&,BOOL);
 
139
int GetMaxSize(CCOM_handle hCCOM,Rect16 Rc,int& num,BOOL vert);
 
140
//BOOL IfBadCut(Handle,Rect16*,Rect16,int,Word8*,CHstr*);
 
141
CCOM_handle CreateContainer(Handle hCPage,CCOM_handle hCCOM_old,Rect16 Rc);
 
142
int GetMinCol(CCOM_comp** pC,int nN,BOOL vert);
 
143
BOOL AddToPrepList(CPrepHstr* temp);
 
144
BOOL AddToCpage(Handle hCPAGE,CPrepHstr* temp);
 
145
BOOL InitPrepList(Handle hCPAGE);
 
146
CPrepHstr* WasAlreadyPrep(CHstr* my_str);
 
147
void  GetIdealRect(CCOM_handle HCCOM,Rect16 Rc,Rect16* Rect);
 
148
void GetStrBounds(CCOM_handle hCCOM,Rect16* pRc,int nRc,int num,int* ptop,int* pbottom,BOOL vert,Rect16 Rc);
 
149
BOOL MainVertDiagnostic(Handle hCPage,CCOM_handle hCCOM,CPrepHstr* temp,Rect16* pRc,int nRc,int param);
 
150
BOOL NotIn(CCOM_handle,Rect16 Rc,Rect16* pRc,int nRc,BOOL vert,int);
 
151
BOOL NotInAll(CCOM_handle,Rect16 Rc,Rect16* pRc,int& nRc,BOOL vert);
 
152
BOOL IfOneRowComp(CCOM_handle hCCOM,Rect16 Rc,BOOL vert);