MKI_BITMAPREF (Basic Classes) Changed in Version 2025.0

www.CAD6.com

C++ Syntax

class MKI_BITMAPREF

{

  public:

 

  MKI_FILEREFERENCE m_szBitmapName;

  MKI_MATRIX m_cDisplayMatrix;

  MKI_BITMAP_EFFECT m_cEffect;

  __int32 m_nFitMode;

          m_nAlignMode;

  MKI_VECTOR m_cFitSize;

  __int32 m_nListIndex;

 

  void

  Init( void );

 

  bool

  IsIdentical( const MKI_BITMAPREF_REF f_rData ) const; New in Version 2022.1

 

  bool

  UsesFitting( void ) const; New in Version 2025.0

};

 

This structure contains settings for a bitmap reference.

 

Element Description

m_szBitmapName Changed in Version 2019.1

[MKI_FILEREFERENCE] Name of the bitmap to be displayed. If this name starts with the prefix character '#' (Ansi 35), this name is a reference to an internal bitmap of this file. Else, it is a file name of a valid bitmap file (BMP, JPG, PNG, GIF, etc.). The maximum size of such a bitmap is usually 32,000 by 32,000 pixels (although some bitmap file types can exceed this limit), using color depths of 1 bit, 4 bit, 8 bit, 8 bit + alpha channel, 24 bit, or 24 bit + alpha channel.

m_cDisplayMatrix

[MKI_MATRIX] Display matrix of the bitmap. The position stored in the matrix places the insertion point of the bitmap (whose position relative to the bitmap depends on m_nAlignMode), the scaling and rotation information determines the size and orientation of the display. If fitted, the size depends on m_nFitMode and m_cFitSize. If not fitted, the size is relative to the default bitmap resolution stored in the bitmap's header. If the bitmap does not contain a valid resolution information, the resolution is assumed to be 72 dpi.

m_cEffect New in Version 2024.1

[MKI_BITMAP_EFFECT] Options for live image processing.

m_nFitMode New in Version 2025.0

[__int32] Fitting mode for the bitmap, see MKI_FITMODE_*.

m_nAlignMode New in Version 2025.0

[__int32] Alignment mode for the bitmap, see MKI_ALIGNMODE_*.

m_cFitSize New in Version 2025.0

[MKI_VECTOR] Absolute size of a rectangle in internal [mm] to fit the bitmap into. It starts at origin and extents to the right and upwards. If one or both values are zero or negative, the bitmap will not be fitted. It should be set in any case, even if m_nFitMode is MKI_FITMODE_NONE, although in that case, no scaling will be applied and alignment will be performed relative to the insertion point (ignoring m_cFitSize).

m_nListIndex New in Version 6.20

[__int32] Zero-based index of the bitmap in the internal caches. This value must not be modified!

 

MKD Syntax

A data block of type MKI_DB_INFO_BITMAPREF (243) is used to store the parameters for bitmap references, i.e. for objects that are used to display bitmap files in the drawing.

 

BitmapName,

DisplayMatrix,

Gamma,Brightness,Contrast,Intensity,DisplayMode,MaskColor

 

Example

|BitmapName|

"C:\\BITMAPS\\MYIMAGE.JPG",

|DisplayMatrix|

2.0,0.0,0.0,2.0,10.0,-7.0,

|Gamma,Brightness,Contrast,Intensity,DisplayMode,MaskColor|

0,0,0,0,1,0/0/0/0,

|FitMode,FitSize|

0,0,160,190

 

This bitmap reference displays the bitmap C:\BITMAPS\MYIMAGE.JPG. It will be located at (10.0, 7.0) and will be displayed in twice its original size. Any white pixel will be transparent. The original bitmap was 1600 pixels wide and 900 pixels with a resolution of 10 pixels per millimeter in both directions (254 dpi). As a result, m_cFitSize is given with 160 by 90 millimeters, although no fitting is performed (m_nFitMode is MKI_FITMODE_NONE, m_nAlignMode is MKI_ALIGNMODE_BL).

 

CAD6interface 2025.1 - Copyright 2025 Malz++Kassner® GmbH