The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



CreateMarkAsBitMap


Unit:SDL_sdlbase
Class: none
Declaration: function CreateMarkAsBitmap (Mark: byte; FGColor, BGColor: TColor; Margin: integer): TBitMap;

The method CreateMarkAsBitmap creates a bitmap which contains the symbol specified by the parameter Mark:

The symbol is drawn in the middle of the bitmap using the colors FGColor as foreground color and BGColor as background color. The size of the bitmap depends on the parameter Margin which may take a value between 0 and 255 (pixels). The minimum size of the symbol is a square of 7 x 7 pixels (Margin = 0). The margin in drawn using the background color BGColor.

If the parameter mark is greater than MAXCANVASMARKS, a character corresponding to its ASCII code is displayed instead of a symbol. Digits can be drawn by setting mark to the codes 200..209 (200 = '0', 209 = '9').

Hint: Due to a bug in Delphi 2005 (.NET only) the filled symbols cannot be drawn correctly. This bug occurs only under the .NET environment, under Win32 the function CreateMarkAsBitmap works as expected.

As of January 2005, there is no known work-around for this bug. If you need the full palette of symbols, you have to use Win32.

Example: This function is used in the following example program (see http://www.lohninger.com/examples.html for downloading the code): markselection



Last Update: 2012-Oct-20