2
Copyright (c) 1993-2008, Cognitive Technologies
5
����������� ��������� ��������������� � ������������� ��� � ���� ��������� ����,
6
��� � � �������� �����, � ����������� ��� ���, ��� ���������� ��������� �������:
8
* ��� ��������� ��������������� ��������� ���� ������ ���������� ���������
9
���� ����������� �� ��������� �����, ���� ������ ������� � �����������
11
* ��� ��������� ��������������� ��������� ���� � ������������ �/��� �
12
������ ����������, ������������ ��� ���������������, ������ �����������
13
��������� ���� ���������� �� ��������� �����, ���� ������ ������� �
14
����������� ����� �� ��������.
15
* �� �������� Cognitive Technologies, �� ����� �� ����������� �� �����
16
���� ������������ � �������� �������� ��������� �/��� �����������
17
���������, ���������� �� ���� ��, ��� ���������������� �����������
20
��� ��������� ������������� ����������� ��������� ���� �/��� ������� ������ "���
21
��� ����" ��� ������-���� ���� ��������, ���������� ���� ��� ���������������,
22
������� �������� ������������ �������� � ����������� ��� ���������� ����, �� ��
23
������������� ���. �� �������� ��������� ���� � �� ���� ������ ����, �������
24
����� �������� �/��� �������� �������������� ���������, �� � ���� ������ ��
25
��Ѩ� ���������������, ������� ����� �����, ���������, ����������� ���
26
������������� ������, ��������� � �������������� ��� ���������� ����������
27
������������� ������������� ��������� (������� ������ ������, ��� ������,
28
������� ���������, ��� ������ �/��� ������ �������, ���������� ��-�� ��������
29
������� ��� �/��� ������ ��������� �������� ��������� � ������� �����������,
30
�� �� ������������� ����� ��������), �� �� ������������� ���, ���� ���� �����
31
�������� ��� ������ ���� ���� �������� � ����������� ����� ������� � ������.
33
Redistribution and use in source and binary forms, with or without modification,
34
are permitted provided that the following conditions are met:
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.
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.
57
// �RTurner.h: interface for the CRTurner class.
59
///////////////////////////////////////////////////////////////////////////////////////////////////
61
#if !defined(CRTURNER_H__)
63
///////////////////////////////////////////////////////////////////////////////////////////////////
67
#endif // _MSC_VER > 1000
68
///////////////////////////////////////////////////////////////////////////////////////////////////
73
#define CONTINUEPIXEL(a) if ( !(a) ) continue;
74
///////////////////////////////////////////////////////////////////////////////////////////////////
79
Bool32 TurnDIB(PCTDIB pInDIB, PCTDIB pOutDIB, Word32 wAngle);
80
Bool32 FreeDIB(void * pDIB);
81
void * TurnDIB( void * pDIB, Word32 wAngle);
86
Bool32 WriteDIBtoBMP(const char *cName, PCTDIB pDIB);
87
Bool32 Turn270GC(PCTDIB pIn, PCTDIB pOut);
88
Bool32 Turn180GC(PCTDIB pIn, PCTDIB pOut);
89
Bool32 Turn90GC(PCTDIB pIn, PCTDIB pOut);
90
Bool32 Turn270LA(PCTDIB pInDIB, PCTDIB pOutDIB);
91
Bool32 Turn90LA(PCTDIB pInDIB, PCTDIB pOutDIB);
92
Bool32 CheckInAndOut180(PCTDIB pIn, PCTDIB pOut);
93
Bool32 CheckInAndOut90(PCTDIB pIn, PCTDIB pOut);
94
void FreeBuffers(void);
95
Bool32 Turn270(PCTDIB pInDIB, PCTDIB pOutDIB);
96
Bool32 Turn180(PCTDIB pInDIB, PCTDIB pOutDIB);
97
Bool32 Turn90(PCTDIB pInDIB, PCTDIB pOutDIB);
98
Bool32 Turn180LA(PCTDIB pInDIB, PCTDIB pOutDIB);
101
Word32 wRightShift[8];// { 7, 6, 5, 4, 3, 2, 1, 0};
102
Word8 wRightMask[8]; // { 11111110b, 11111100b, 11111000b, 11110000b, 11100000b, 11000000b, 10000000b, 00000000b };
103
Word8 wLeftMask[8]; // { 11111110b, 11111100b, 11111000b, 11110000b, 11100000b, 11000000b, 10000000b, 00000000b };
104
Word8 wBitMask[8]; // { 10000000b, 01000000b, 00100000b, 00010000b, 00001000b, 00000100b, 00000010b, 00000001b };
107
Word8 Turn1at180[256];
108
Word8 Turn1at90[132][8];
111
typedef CRTurner *PCRTurner, **PPCRTurner;
112
#endif // !defined(CRTURNER_H__)