3 <title>KOL Help: TBitmap object (main frame)
</title>
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>
13 TBitmap = object(
<a href=tobj.htm
target=
"_top">TObj
</a> )
15 Bitmap incapsulation object.
16 <h3 align=
"center"><font color=
"#FF8080">TBitmap properties
</font></h3>
19 <font face=
"Courier" color=
"#800080"><b>property
</b> <font color=
"#808000"><b>Width
</b></font>:
<b>Integer
</b>;
</font>
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.
27 <font face=
"Courier" color=
"#800080"><b>property
</b> <font color=
"#808000"><b>Height
</b></font>:
<b>Integer
</b>;
</font>
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.
33 <a name=
"boundsrect"></a>
35 <font face=
"Courier" color=
"#800080"><b>property
</b> <font color=
"#808000"><b>BoundsRect
</b></font>: TRect;
</font>
36 <font face=
"Webdings" size=
7>Ñ</font>
38 Returns rectangle (
0,
0,
<a href=#width
target=
"main">Width
</a>,
<a href=#height
target=
"main">Height
</a>).
42 <font face=
"Courier" color=
"#800080"><b>property
</b> <font color=
"#808000"><b>Empty
</b></font>:
<b>Boolean
</b>;
</font>
43 <font face=
"Webdings" size=
7>Ñ</font>
45 Returns True if
<a href=#width
target=
"main">Width
</a> or
<a href=#height
target=
"main">Height
</a> is
0.
49 <font face=
"Courier" color=
"#800080"><b>property
</b> <font color=
"#808000"><b>Handle
</b></font>: HBitmap;
</font>
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.
54 <a name=
"handleallocated"></a>
56 <font face=
"Courier" color=
"#800080"><b>property
</b> <font color=
"#808000"><b>HandleAllocated
</b></font>:
<b>Boolean
</b>;
</font>
57 <font face=
"Webdings" size=
7>Ñ</font>
59 Returns True, if
<a href=#handle
target=
"main">Handle
</a> already allocated.
61 <a name=
"handletype"></a>
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>
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.
73 <a name=
"pixelformat"></a>
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>
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.
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 <font face=
"Webdings" size=
7>Ñ</font>
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).
92 <a name=
"bkcolor"></a>
94 <font face=
"Courier" color=
"#800080"><b>property
</b> <font color=
"#808000"><b>BkColor
</b></font>: TColor;
</font>
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.
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>
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>.
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 <font face=
"Webdings" size=
7>Ñ</font>
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).
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 <font face=
"Webdings" size=
7>Ñ</font>
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).
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>
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.
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 <font face=
"Webdings" size=
7>Ñ</font>
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.
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>
159 Provides direct access to DIB palette.
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 <font face=
"Webdings" size=
7>Ñ</font>
166 This property is mainly for internal use.
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 <font face=
"Webdings" size=
7>Ñ</font>
173 Size of
<a href=#dibbits
target=
"main">DIBBits
</a> array.
175 <a name=
"dibheader"></a>
177 <font face=
"Courier" color=
"#800080"><b>property
</b> <font color=
"#808000"><b>DIBHeader
</b></font>: PBitmapInfo;
</font>
178 <font face=
"Webdings" size=
7>Ñ</font>
180 This property is mainly for internal use.
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>
186 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>Clear
</b></font>;
</font>
188 Makes bitmap empty, setting its
<a href=#width
target=
"main">Width
</a> and
<a href=#height
target=
"main">Height
</a> to
0.
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>
194 Loads bitmap from file (
<a href=#loadfromstream
target=
"main">LoadFromStream
</a> used).
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>
200 Loads bitmap from a file. If necessary, bitmap is RLE-decoded. Code given
201 by Vyacheslav A. Gavrik.
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>
207 Stores bitmap to file (
<a href=#savetostream
target=
"main">SaveToStream
</a> used).
209 <a name=
"loadfromstream"></a>
211 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>LoadFromStream
</b></font>( Strm: PStream );
</font>
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.
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>
221 Loads bitmap from a stream. Difference is that RLE decoding supported.
222 Code given by Vyacheslav A. Gavrik.
224 <a name=
"savetostream"></a>
226 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>SaveToStream
</b></font>( Strm: PStream );
</font>
228 Saves bitmap to stream. If bitmap is not DIB, it is converted to DIB
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>
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:
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
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>
259 Loads bitmap from resurce (using passed name of bitmap resource.
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>
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.
269 <a name=
"releasehandle"></a>
271 <font face=
"Courier" color=
"#800080"><b>function
</b> <font color=
"#808000"><b>ReleaseHandle
</b></font>: HBitmap;
</font>
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.
278 <a name=
"dormant"></a>
280 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>Dormant
</b></font>;
</font>
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.
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>
292 Returns bits per pixel if possible.
296 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>Draw
</b></font>( DC: HDC; X, Y:
<b>Integer
</b> );
</font>
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
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>
307 Draws bitmap onto DC, stretching it to fit given rectangle Rect.
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>
313 Draws bitmap onto DC transparently, using TranspColor as transparent.
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>
319 Draws bitmap onto given rectangle of destination DC (with stretching it
320 to fit Rect) - transparently, using TranspColor as transparent.
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>
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.
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>
334 Like
<a href=#drawmasked
target=
"main">DrawMasked
</a>, but with stretching image onto given rectangle.
336 <a name=
"convert2mask"></a>
338 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>Convert2Mask
</b></font>( TranspColor: TColor );
</font>
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.
347 <a name=
"invert"></a>
349 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>Invert
</b></font>;
</font>
353 <a name=
"removecanvas"></a>
355 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>RemoveCanvas
</b></font>;
</font>
357 Call this method to destroy
<a href=#canvas
target=
"main">Canvas
</a> and free GDI resources.
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>
363 Returns index of entry in DIB palette with color nearest (or matching)
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>
370 This procedure copies given rectangle to the target device context,
371 but only for DIB bitmap (using SetDIBBitsToDevice API call).
373 <a name=
"rotateright"></a>
375 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>RotateRight
</b></font>;
</font>
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
384 <a name=
"rotateleft"></a>
386 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>RotateLeft
</b></font>;
</font>
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
395 <a name=
"rotaterightmono"></a>
397 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>RotateRightMono
</b></font>;
</font>
399 Rotates bitmat right, but only if bitmap is monochrome (pf1bit).
401 <a name=
"rotateleftmono"></a>
403 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>RotateLeftMono
</b></font>;
</font>
405 Rotates bitmap left, but only if bitmap is monochrome (pf1bit).
407 <a name=
"rotateright4bit"></a>
409 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>RotateRight4bit
</b></font>;
</font>
411 Rotates bitmap right, but only if
<a href=#pixelformat
target=
"main">PixelFormat
</a> is pf4bit.
413 <a name=
"rotateleft4bit"></a>
415 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>RotateLeft4bit
</b></font>;
</font>
417 Rotates bitmap left, but only if
<a href=#pixelformat
target=
"main">PixelFormat
</a> is pf4bit.
419 <a name=
"rotateright8bit"></a>
421 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>RotateRight8bit
</b></font>;
</font>
423 Rotates bitmap right, but only if
<a href=#pixelformat
target=
"main">PixelFormat
</a> is pf8bit.
425 <a name=
"rotateleft8bit"></a>
427 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>RotateLeft8bit
</b></font>;
</font>
429 Rotates bitmap left, but only if
<a href=#pixelformat
target=
"main">PixelFormat
</a> is pf8bit.
431 <a name=
"rotateright16bit"></a>
433 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>RotateRight16bit
</b></font>;
</font>
435 Rotates bitmap right, but only if
<a href=#pixelformat
target=
"main">PixelFormat
</a> is pf16bit.
437 <a name=
"rotateleft16bit"></a>
439 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>RotateLeft16bit
</b></font>;
</font>
441 Rotates bitmap left, but only if
<a href=#pixelformat
target=
"main">PixelFormat
</a> is pf16bit.
443 <a name=
"rotaterighttruecolor"></a>
445 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>RotateRightTrueColor
</b></font>;
</font>
447 Rotates bitmap right, but only if
<a href=#pixelformat
target=
"main">PixelFormat
</a> is pf24bit or pf32bit.
449 <a name=
"rotatelefttruecolor"></a>
451 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>RotateLeftTrueColor
</b></font>;
</font>
453 Rotates bitmap left, but only if
<a href=#pixelformat
target=
"main">PixelFormat
</a> is pf24bit or pf32bit.
455 <a name=
"flipvertical"></a>
457 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>FlipVertical
</b></font>;
</font>
459 Flips bitmap vertically
461 <a name=
"fliphorizontal"></a>
463 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>FlipHorizontal
</b></font>;
</font>
465 Flips bitmap horizontally
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>
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.
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>
479 Copies bitmap to clipboard.
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>
485 Takes CF_DIB format bitmap from clipboard and assigns it to the
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>
494 <p align=
"center">[
<a href=index.htm
>Index
</a> ]
</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>