initial commit
[rofl0r-KOL.git] / main_tbitmap.htm
blob9b80ae7386ca673a915b0ce47313fb06f08a6772
1 <html>
2 <head>
3 <title>KOL Help: TBitmap object (main frame)</title>
4 <base target="_top">
5 </head>
7 <body bgcolor="#FFFFEF" text="#000000" link="#008080" vlink="#008000" alink="#808000">
8 <p><font face="Courier" color="#800080"><b>TBitmap( unit <a href=kol_pas.htm>KOL.pas</a> )
9 <font face="Wingdings">ï</font> <a href=tobj.htm>TObj</a>
10 <font face="Wingdings">ï</font> <a href=_tobj.htm>_TObj</a>
11 </b></font></p>
12 <p><b>
13 TBitmap = object( <a href=tobj.htm target="_top">TObj</a> )
14 </b></p>
15 Bitmap incapsulation object.
16 <h3 align="center"><font color="#FF8080">TBitmap properties</font></h3>
17 <a name="width"></a>
18 <p>
19 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>Width</b></font>: <b>Integer</b>;</font>
20 <br>
21 Width of bitmap. To make code smaller, avoid changing Width or <a href=#height target="main">Height</a>
22 after bitmap is created (using <a href=kol_pas.htm#newbitmap target="_top">NewBitmap</a>) or after it is loaded from
23 file, stream of resource.
24 </p>
25 <a name="height"></a>
26 <p>
27 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>Height</b></font>: <b>Integer</b>;</font>
28 <br>
29 Height of bitmap. To make code smaller, avoid changing <a href=#width target="main">Width</a> or Height
30 after bitmap is created (using <a href=kol_pas.htm#newbitmap target="_top">NewBitmap</a>) or after it is loaded from
31 file, stream of resource.
32 </p>
33 <a name="boundsrect"></a>
34 <p>
35 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>BoundsRect</b></font>: TRect;</font>
36 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#209;</font>&nbsp;&nbsp;&nbsp;
37 <br>
38 Returns rectangle (0,0,<a href=#width target="main">Width</a>,<a href=#height target="main">Height</a>).
39 </p>
40 <a name="empty"></a>
41 <p>
42 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>Empty</b></font>: <b>Boolean</b>;</font>
43 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#209;</font>&nbsp;&nbsp;&nbsp;
44 <br>
45 Returns True if <a href=#width target="main">Width</a> or <a href=#height target="main">Height</a> is 0.
46 </p>
47 <a name="handle"></a>
48 <p>
49 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>Handle</b></font>: HBitmap;</font>
50 <br>
51 Handle of bitmap. Created whenever property accessed. To check if handle
52 is allocated (without allocating it), use <a href=#handleallocated target="main">HandleAllocated</a> property.
53 </p>
54 <a name="handleallocated"></a>
55 <p>
56 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>HandleAllocated</b></font>: <b>Boolean</b>;</font>
57 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#209;</font>&nbsp;&nbsp;&nbsp;
58 <br>
59 Returns True, if <a href=#handle target="main">Handle</a> already allocated.
60 </p>
61 <a name="handletype"></a>
62 <p>
63 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>HandleType</b></font>: <a href=kol_pas.htm#tbitmaphandletype target="_top">TBitmapHandleType</a>;</font>
64 <br>
65 bmDIB, if DIB part of image data is filled and stored internally in
66 TBitmap object. DIB image therefore can have <a href=#handle target="main">Handle</a> allocated, which
67 require resources. Use <a href=#handleallocated target="main">HandleAllocated</a> funtion to determine if handle
68 is allocated and <a href=#dormant target="main">Dormant</a> method to remove it, if You want to economy
69 GDI resources. (Actually <a href=#handle target="main">Handle</a> needed for DIB bitmap only in case
70 when <a href=#canvas target="main">Canvas</a> is used to draw on bitmap surface). Please note also, that
71 before saving bitmap to file or stream, it is converted to DIB.
72 </p>
73 <a name="pixelformat"></a>
74 <p>
75 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>PixelFormat</b></font>: <a href=kol_pas.htm#tpixelformat target="_top">TPixelFormat</a>;</font>
76 <br>
77 Current pixel format. If format of bitmap is unknown, or bitmap is DDB,
78 value is pfDevice. Setting PixelFormat to any other format converts
79 bitmap to DIB, back to pfDevice converts bitmap to DDB again. Avoid
80 such conversations for large bitmaps or for numerous bitmaps in your
81 application to keep good performance.
82 </p>
83 <a name="canvas"></a>
84 <p>
85 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>Canvas</b></font>: <a href=kol_pas.htm#pcanvas target="_top">PCanvas</a>;</font>
86 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#209;</font>&nbsp;&nbsp;&nbsp;
87 <br>
88 Canvas can be used to draw onto bitmap. Whenever it is accessed, handle
89 is allocated for bitmap, if it is not yet (to make it possible
90 to select bitmap to display compatible device context).
91 </p>
92 <a name="bkcolor"></a>
93 <p>
94 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>BkColor</b></font>: TColor;</font>
95 <br>
96 Used to fill background for Bitmap, when its width or height is increased.
97 Although this value always synchronized with Canvas.Brush.Color, use it
98 instead if You do not use <a href=#canvas target="main">Canvas</a> for drawing on bitmap surface.
99 </p>
100 <a name="pixels"></a>
102 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>Pixels</b></font>[ X, Y: <b>Integer</b> ]: TColor;</font>
103 <br>
104 Allows to obtain or change certain pixels of a bitmap. This method is
105 both for DIB and DDB bitmaps, and leads to allocate handle anyway. For
106 DIB bitmaps, it is possible to use property <a href=#dibpixels target="main">DIBPixels</a>[ ] instead,
107 which is much faster and does not require in <a href=#handle target="main">Handle</a>.
108 </p>
109 <a name="scanlinesize"></a>
111 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>ScanLineSize</b></font>: <b>Integer</b>;</font>
112 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#209;</font>&nbsp;&nbsp;&nbsp;
113 <br>
114 Returns size of scan line in bytes. Use it to measure size of a single
115 <a href=#scanline target="main">ScanLine</a>. To calculate increment value from first byte of <a href=#scanline target="main">ScanLine</a> to
116 first byte of next <a href=#scanline target="main">ScanLine</a>, use difference
117 <p align=left><font face="Courier" color="008080"><b><pre>
118 <font color="800000"><b>Integer</b></font>(<a href="tbitmap.htm#scanline"><font color="008080">ScanLine</font></a>[1]-<a href="tbitmap.htm#scanline"><font color="008080">ScanLine</font></a>[0])
119 </pre></b></font></p>
120 (this is because bitmap can be oriented from bottom to top, so
121 step can be negative).
122 </p>
123 <a name="scanline"></a>
125 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>ScanLine</b></font>[ Y: <b>Integer</b> ]: <b>Pointer</b>;</font>
126 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#209;</font>&nbsp;&nbsp;&nbsp;
127 <br>
128 Use ScanLine to access DIB bitmap pixels in memory to direct access it
129 fast. Take in attention, that for different pixel formats, different
130 bit counts are used to represent bitmap pixels. Also do not forget, that
131 for formats pf4bit and pf8bit, pixels actually are indices to palette
132 entries, and for formats pf16bit, pf24bit and pf32bit are actually
133 RGB values (for pf16bit B:5-G:6-R:5, for pf15bit B:5-G:5-R:5 (high order
134 bit not used), for pf24bit B:8-G:8-R:8, and for pf32bit high order byte
135 of TRGBQuad structure is not used).
136 </p>
137 <a name="dibpixels"></a>
139 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>DIBPixels</b></font>[ X, Y: <b>Integer</b> ]: TColor;</font>
140 <br>
141 Allows direct access to pixels of DIB bitmap, faster then <a href=#pixels target="main">Pixels</a>[ ]
142 property. Access to read is slower for pf15bit, pf16bit formats (because
143 some conversation needed to translate packed RGB color to TColor). And
144 for write, operation performed most slower for pf4bit, pf8bit (searching
145 nearest color required) and fastest for pf24bit, pf32bit and pf1bit.
146 </p>
147 <a name="dibpalentrycount"></a>
149 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>DIBPalEntryCount</b></font>: <b>Integer</b>;</font>
150 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#209;</font>&nbsp;&nbsp;&nbsp;
151 <br>
152 Returns palette entries count for DIB image. Always returns 2 for pf1bit,
153 16 for pf4bit, 256 for pf8bit and 0 for other pixel formats.
154 </p>
155 <a name="dibpalentries"></a>
157 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>DIBPalEntries</b></font>[ Idx: <b>Integer</b> ]: TColor;</font>
158 <br>
159 Provides direct access to DIB palette.
160 </p>
161 <a name="dibbits"></a>
163 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>DIBBits</b></font>: <b>Pointer</b>;</font>
164 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#209;</font>&nbsp;&nbsp;&nbsp;
165 <br>
166 This property is mainly for internal use.
167 </p>
168 <a name="dibsize"></a>
170 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>DIBSize</b></font>: <b>Integer</b>;</font>
171 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#209;</font>&nbsp;&nbsp;&nbsp;
172 <br>
173 Size of <a href=#dibbits target="main">DIBBits</a> array.
174 </p>
175 <a name="dibheader"></a>
177 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>DIBHeader</b></font>: PBitmapInfo;</font>
178 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#209;</font>&nbsp;&nbsp;&nbsp;
179 <br>
180 This property is mainly for internal use.
181 </p>
182 <h4 align="center"><font color="black">Properties, inherited from <a href="tobj.htm" target="_top">TObj</a></font></h4>
183 <h3 align="center"><font color="#FF8080">TBitmap methods</font></h3>
184 <a name="clear"></a>
186 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>Clear</b></font>;</font>
187 <br>
188 Makes bitmap empty, setting its <a href=#width target="main">Width</a> and <a href=#height target="main">Height</a> to 0.
189 </p>
190 <a name="loadfromfile"></a>
192 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>LoadFromFile</b></font>( <b>const</b> Filename: <b>String</b> );</font>
193 <br>
194 Loads bitmap from file (<a href=#loadfromstream target="main">LoadFromStream</a> used).
195 </p>
196 <a name="loadfromfileex"></a>
198 <font face="Courier" color="#800080"><b>function</b> <font color="#808000"><b>LoadFromFileEx</b></font>( <b>const</b> Filename: <b>String</b> ): <b>Boolean</b>;</font>
199 <br>
200 Loads bitmap from a file. If necessary, bitmap is RLE-decoded. Code given
201 by Vyacheslav A. Gavrik.
202 </p>
203 <a name="savetofile"></a>
205 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>SaveToFile</b></font>( <b>const</b> Filename: <b>String</b> );</font>
206 <br>
207 Stores bitmap to file (<a href=#savetostream target="main">SaveToStream</a> used).
208 </p>
209 <a name="loadfromstream"></a>
211 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>LoadFromStream</b></font>( Strm: PStream );</font>
212 <br>
213 Loads bitmap from stream. Follow loading, bitmap has DIB format (without
214 handle allocated). It is possible to draw DIB bitmap without creating
215 handle for it, which can economy GDI resources.
216 </p>
217 <a name="loadfromstreamex"></a>
219 <font face="Courier" color="#800080"><b>function</b> <font color="#808000"><b>LoadFromStreamEx</b></font>( Strm: PStream ): <b>Boolean</b>;</font>
220 <br>
221 Loads bitmap from a stream. Difference is that RLE decoding supported.
222 Code given by Vyacheslav A. Gavrik.
223 </p>
224 <a name="savetostream"></a>
226 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>SaveToStream</b></font>( Strm: PStream );</font>
227 <br>
228 Saves bitmap to stream. If bitmap is not DIB, it is converted to DIB
229 before saving.
230 </p>
231 <a name="loadfromresourceid"></a>
233 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>LoadFromResourceID</b></font>( Inst: <b>DWORD</b>; ResID: <b>Integer</b> );</font>
234 <br>
235 Loads bitmap from resource using integer ID of resource. To load by name,
236 use LoadFromResurceName. To load resource of application itself, pass
237 hInstance as first parameter. This method also can be used to load system
238 predefined bitmaps, if 0 is passed as Inst parameter:
239 <pre>
240 OBM_BTNCORNERS OBM_REDUCE
241 OBM_BTSIZE OBM_REDUCED
242 OBM_CHECK OBM_RESTORE
243 OBM_CHECKBOXES OBM_RESTORED
244 OBM_CLOSE OBM_RGARROW
245 OBM_COMBO OBM_RGARROWD
246 OBM_DNARROW OBM_RGARROWI
247 OBM_DNARROWD OBM_SIZE
248 OBM_DNARROWI OBM_UPARROW
249 OBM_LFARROW OBM_UPARROWD
250 OBM_LFARROWD OBM_UPARROWI
251 OBM_LFARROWI OBM_ZOOM
252 OBM_MNARROW OBM_ZOOMD
253 </pre>
254 </p>
255 <a name="loadfromresourcename"></a>
257 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>LoadFromResourceName</b></font>( Inst: <b>DWORD</b>; ResName: <b>PChar</b> );</font>
258 <br>
259 Loads bitmap from resurce (using passed name of bitmap resource.
260 </p>
261 <a name="assign"></a>
263 <font face="Courier" color="#800080"><b>function</b> <font color="#808000"><b>Assign</b></font>( SrcBmp: PBitmap ): <b>Boolean</b>;</font>
264 <br>
265 Assigns bitmap from another. Returns False if not success.
266 Note: remember, that <a href=#canvas target="main">Canvas</a> is not assigned - only bitmap image
267 is copied. And for DIB, handle is not allocating due this process.
268 </p>
269 <a name="releasehandle"></a>
271 <font face="Courier" color="#800080"><b>function</b> <font color="#808000"><b>ReleaseHandle</b></font>: HBitmap;</font>
272 <br>
273 Returns <a href=#handle target="main">Handle</a> and releases it, so bitmap no more know about handle.
274 This method does not destroy bitmap image, but converts it into DIB.
275 Returned <a href=#handle target="main">Handle</a> actually is a handle of copy of original bitmap. If
276 You need not in keping it up, use <a href=#dormant target="main">Dormant</a> method instead.
277 </p>
278 <a name="dormant"></a>
280 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>Dormant</b></font>;</font>
281 <br>
282 Releases handle from bitmap and destroys it. But image is not destroyed
283 and its data are preserved in DIB format. Please note, that in KOL, DIB
284 bitmaps can be drawn onto given device context without allocating of
285 handle. So, it is very useful to call Dormant preparing it using
286 <a href=#canvas target="main">Canvas</a> drawing operations - to economy GDI resources.
287 </p>
288 <a name="bitsperpixel"></a>
290 <font face="Courier" color="#800080"><b>function</b> <font color="#808000"><b>BitsPerPixel</b></font>: <b>Integer</b>;</font>
291 <br>
292 Returns bits per pixel if possible.
293 </p>
294 <a name="draw"></a>
296 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>Draw</b></font>( DC: HDC; X, Y: <b>Integer</b> );</font>
297 <br>
298 Draws bitmap to given device context. If bitmap is DIB, it is always
299 drawing using SetDIBitsToDevice API call, which does not require bitmap
300 handle (so, it is very sensible to call <a href=#dormant target="main">Dormant</a> method to free correspondent
301 GDI resources).
302 </p>
303 <a name="stretchdraw"></a>
305 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>StretchDraw</b></font>( DC: HDC; <b>const</b> Rect: TRect );</font>
306 <br>
307 Draws bitmap onto DC, stretching it to fit given rectangle Rect.
308 </p>
309 <a name="drawtransparent"></a>
311 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>DrawTransparent</b></font>( DC: HDC; X, Y: <b>Integer</b>; TranspColor: TColor );</font>
312 <br>
313 Draws bitmap onto DC transparently, using TranspColor as transparent.
314 </p>
315 <a name="stretchdrawtransparent"></a>
317 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>StretchDrawTransparent</b></font>( DC: HDC; <b>const</b> Rect: TRect; TranspColor: TColor );</font>
318 <br>
319 Draws bitmap onto given rectangle of destination DC (with stretching it
320 to fit Rect) - transparently, using TranspColor as transparent.
321 </p>
322 <a name="drawmasked"></a>
324 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>DrawMasked</b></font>( DC: HDC; X, Y: <b>Integer</b>; Mask: HBitmap );</font>
325 <br>
326 Draws bitmap to destination DC transparently by mask. It is possible
327 to pass as a mask handle of another TBitmap, previously converted to
328 monochrome mask using <a href=#convert2mask target="main">Convert2Mask</a> method.
329 </p>
330 <a name="stretchdrawmasked"></a>
332 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>StretchDrawMasked</b></font>( DC: HDC; <b>const</b> Rect: TRect; Mask: HBitmap );</font>
333 <br>
334 Like <a href=#drawmasked target="main">DrawMasked</a>, but with stretching image onto given rectangle.
335 </p>
336 <a name="convert2mask"></a>
338 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>Convert2Mask</b></font>( TranspColor: TColor );</font>
339 <br>
340 Converts bitmap to monochrome (mask) bitmap with TranspColor replaced
341 to clBlack and all other ones to clWhite. Such mask bitmap can be used
342 to draw original bitmap transparently, with given TranspColor as
343 transparent. (To preserve original bitmap, create new instance of
344 TBitmap and assign original bitmap to it). See also <a href=#drawtransparent target="main">DrawTransparent</a> and
345 <a href=#stretchdrawtransparent target="main">StretchDrawTransparent</a> methods.
346 </p>
347 <a name="invert"></a>
349 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>Invert</b></font>;</font>
350 <br>
351 Obvious.
352 </p>
353 <a name="removecanvas"></a>
355 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>RemoveCanvas</b></font>;</font>
356 <br>
357 Call this method to destroy <a href=#canvas target="main">Canvas</a> and free GDI resources.
358 </p>
359 <a name="dibpalnearestentry"></a>
361 <font face="Courier" color="#800080"><b>function</b> <font color="#808000"><b>DIBPalNearestEntry</b></font>( Color: TColor ): <b>Integer</b>;</font>
362 <br>
363 Returns index of entry in DIB palette with color nearest (or matching)
364 to given one.
365 </p>
366 <a name="dibdrawrect"></a>
368 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>DIBDrawRect</b></font>( DC: HDC; X, Y: <b>Integer</b>; <b>const</b> R: TRect );</font>
369 <br>
370 This procedure copies given rectangle to the target device context,
371 but only for DIB bitmap (using SetDIBBitsToDevice API call).
372 </p>
373 <a name="rotateright"></a>
375 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>RotateRight</b></font>;</font>
376 <br>
377 Rotates bitmap right (90 degree). Bitmap must be DIB. If You definitevely
378 know format of a bitmap, use instead one of methods <a href=#rotaterightmono target="main">RotateRightMono</a>,
379 <a href=#rotateright4bit target="main">RotateRight4bit</a>, <a href=#rotateright8bit target="main">RotateRight8bit</a>, <a href=#rotateright16bit target="main">RotateRight16bit</a> or <a href=#rotaterighttruecolor target="main">RotateRightTrueColor</a>
380 - this will economy code. But if for most of formats such methods are
381 called, this can be more economy just to call always universal method
382 RotateRight.
383 </p>
384 <a name="rotateleft"></a>
386 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>RotateLeft</b></font>;</font>
387 <br>
388 Rotates bitmap left (90 degree). Bitmap must be DIB. If You definitevely
389 know format of a bitmap, use instead one of methods <a href=#rotateleftmono target="main">RotateLeftMono</a>,
390 <a href=#rotateleft4bit target="main">RotateLeft4bit</a>, <a href=#rotateleft8bit target="main">RotateLeft8bit</a>, <a href=#rotateleft16bit target="main">RotateLeft16bit</a> or <a href=#rotatelefttruecolor target="main">RotateLeftTrueColor</a>
391 - this will economy code. But if for most of formats such methods are
392 called, this can be more economy just to call always universal method
393 RotateLeft.
394 </p>
395 <a name="rotaterightmono"></a>
397 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>RotateRightMono</b></font>;</font>
398 <br>
399 Rotates bitmat right, but only if bitmap is monochrome (pf1bit).
400 </p>
401 <a name="rotateleftmono"></a>
403 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>RotateLeftMono</b></font>;</font>
404 <br>
405 Rotates bitmap left, but only if bitmap is monochrome (pf1bit).
406 </p>
407 <a name="rotateright4bit"></a>
409 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>RotateRight4bit</b></font>;</font>
410 <br>
411 Rotates bitmap right, but only if <a href=#pixelformat target="main">PixelFormat</a> is pf4bit.
412 </p>
413 <a name="rotateleft4bit"></a>
415 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>RotateLeft4bit</b></font>;</font>
416 <br>
417 Rotates bitmap left, but only if <a href=#pixelformat target="main">PixelFormat</a> is pf4bit.
418 </p>
419 <a name="rotateright8bit"></a>
421 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>RotateRight8bit</b></font>;</font>
422 <br>
423 Rotates bitmap right, but only if <a href=#pixelformat target="main">PixelFormat</a> is pf8bit.
424 </p>
425 <a name="rotateleft8bit"></a>
427 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>RotateLeft8bit</b></font>;</font>
428 <br>
429 Rotates bitmap left, but only if <a href=#pixelformat target="main">PixelFormat</a> is pf8bit.
430 </p>
431 <a name="rotateright16bit"></a>
433 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>RotateRight16bit</b></font>;</font>
434 <br>
435 Rotates bitmap right, but only if <a href=#pixelformat target="main">PixelFormat</a> is pf16bit.
436 </p>
437 <a name="rotateleft16bit"></a>
439 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>RotateLeft16bit</b></font>;</font>
440 <br>
441 Rotates bitmap left, but only if <a href=#pixelformat target="main">PixelFormat</a> is pf16bit.
442 </p>
443 <a name="rotaterighttruecolor"></a>
445 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>RotateRightTrueColor</b></font>;</font>
446 <br>
447 Rotates bitmap right, but only if <a href=#pixelformat target="main">PixelFormat</a> is pf24bit or pf32bit.
448 </p>
449 <a name="rotatelefttruecolor"></a>
451 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>RotateLeftTrueColor</b></font>;</font>
452 <br>
453 Rotates bitmap left, but only if <a href=#pixelformat target="main">PixelFormat</a> is pf24bit or pf32bit.
454 </p>
455 <a name="flipvertical"></a>
457 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>FlipVertical</b></font>;</font>
458 <br>
459 Flips bitmap vertically
460 </p>
461 <a name="fliphorizontal"></a>
463 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>FlipHorizontal</b></font>;</font>
464 <br>
465 Flips bitmap horizontally
466 </p>
467 <a name="copyrect"></a>
469 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>CopyRect</b></font>( <b>const</b> DstRect: TRect; SrcBmp: PBitmap; <b>const</b> SrcRect: TRect );</font>
470 <br>
471 It is possible to use Canvas.CopyRect for such purpose, but if You
472 do not want use <a href=tcanvas.htm target="_top">TCanvas</a>, it is possible to copy rectangle from one
473 bitmap to another using this function.
474 </p>
475 <a name="copytoclipboard"></a>
477 <font face="Courier" color="#800080"><b>function</b> <font color="#808000"><b>CopyToClipboard</b></font>: <b>Boolean</b>;</font>
478 <br>
479 Copies bitmap to clipboard.
480 </p>
481 <a name="pastefromclipboard"></a>
483 <font face="Courier" color="#800080"><b>function</b> <font color="#808000"><b>PasteFromClipboard</b></font>: <b>Boolean</b>;</font>
484 <br>
485 Takes CF_DIB format bitmap from clipboard and assigns it to the
486 TBitmap object.
487 </p>
488 <h4 align="center"><font color="black">Methods, inherited from <a href="tobj.htm" target="_top">TObj</a></font></h4>
489 <h3 align="center"><font color="#FF8080">TBitmap events</font></h3>
490 <h4 align="center"><font color="black">Events, inherited from <a href="tobj.htm" target="_top">TObj</a></font></h4>
491 <h3 align="center"><font color="#FF8080">TBitmap fields</font></h3>
492 <h4 align="center"><font color="black">Fields, inherited from <a href="tobj.htm" target="_top">TObj</a></font></h4>
493 <hr>
494 <p align="center">[&nbsp;<a href=index.htm>Index</a>&nbsp;]</p>
495 <p align="center"><font face="Comic Sans MS"><small>This help is generated 22-Sep-2005 by KOL Help generator, (C) 2000-2001 by Vladimir Kladov<br>Modified (C) 2003 by Alexander Bartov</small></font></p>
496 </body>
497 </html>