forked from edivando-fpc/BGRABitmap
-
Notifications
You must be signed in to change notification settings - Fork 5
/
bgrabitmap.inc
80 lines (69 loc) · 2.31 KB
/
bgrabitmap.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{$IFDEF FPC}
{.$B-} // Boolean short-circuit evaluation ON
{.$H+} // Long strings ON
{.$T-} // Type-checked pointers OFF
{.$X+} // Extended syntax ON
{$IFNDEF RO_FPC_MODE_SET}
{$mode Delphi}
{$DEFINE BDS} //code for delphi compatibility
{.$mode objfpc}{.$DEFINE OBJ} //for {$mode objfpc} enable {$DEFINE OBJ} together
{$ENDIF}
{$POINTERMATH ON}
{$DEFINE INLINE}
{$DEFINE BGRABITMAP}
//(FPC_FULLVERSION<20501) >>> not defined(FPC20501)
{.$DEFINE FPC20501}
//(FPC_FULLVERSION<20602) >>> not defined(FPC20602)
{.$DEFINE FPC20602}
//(FPC_FULLVERSION<030001) >>> not defined(FPC030001)
{.$DEFINE FPC030001}
//(lcl_fullversion<1070000) >>> not defined(LCL_030001)
{.$DEFINE LCL1070000}
{ You can define the following compiler directives in the package options,
in tab Compiler options, in section Other. Directives must be prefixed with
"-d". So for example:
- to always have RGBA pixel format, write "-dBGRABITMAP_RGBAPIXEL"
- to always have BGRA pixel format, write "-dBGRABITMAP_BGRAPIXEL"
- to use fpGUI toolkit, write "-dBGRABITMAP_USE_FPGUI" }
{$IFNDEF BGRABITMAP_DONT_USE_LCL}
{$IFDEF LCL}
{$DEFINE BGRABITMAP_USE_LCL}
{$ENDIF}
{$ENDIF}
{$IFDEF BGRABITMAP_USE_FPGUI}{$UNDEF BGRABITMAP_USE_LCL}{$ENDIF}
{ Extensions of LCL to be used. Add // at the beginning of the line
to comment them if the functions are not available }
{$DEFINE BGRABITMAP_USE_LCL12} { Use functions of Lazarus 1.2 }
{$DEFINE BGRABITMAP_USE_LCL15} { Use functions of Lazarus 1.5 }
{.$DEFINE BDS} //delphi compatibility
{$IFDEF OBJ}
{$MODESWITCH ADVANCEDRECORDS}
{$MODESWITCH TypeHelpers}
{$ENDIF}
{$ELSE}
{.$extendedsyntax on}
{.$writeableconst on}
{.$varstringchecks on}
{.$typedaddress off}
{.$overflowchecks off}
{$rangechecks off}
{.$realcompatibility off}
{.$openstrings on}
{$longstrings on}
{.$booleval off}
{.$safedivide off}
{.$optimization on}
{.$finitefloat off}
{$EXCESSPRECISION OFF}
{$POINTERMATH ON}
{$DEFINE INLINE}
{$INLINE ON}
{$DEFINE BGRABITMAP}
{$DEFINE BDS}
{$DEFINE BGRABITMAP_USE_LCL}
{$DEFINE BGRABITMAP_USE_LCL12} { Use functions of Lazarus 1.2 }
{$DEFINE BGRABITMAP_USE_LCL15} { Use functions of Lazarus 1.5 }
{$DEFINE FPC030001}
{$DEFINE ENDIAN_LITTLE}
{.$DEFINE RENDER_TEXT_ON_TBITMAP}
{$ENDIF}