Floaters and Regions in the LBitmapWindow Class

The LBitmapWindow class automates the region and floater capabilities of the toolkit.

Some definitions:


A selection (actually, a separate bitmap) that has an animated outline.


A subset of a bitmap, much like a Windows region. When a bitmap has a region, most image processing functions will only process the region and not the entire bitmap.

The following are various scenarios and how they can be implemented with the LBitmapWindow class.

Scenario One

I want to create a floater with the region tool, and move it around. I don't want a region

<Click and drag mouse to create floater>   
<Drag mouse to move floater> 

In this scenario, no region is created

Scenario Two

I want to create a region with the region tool. I don't want the floater.

Click and drag mouse to create floater   
m_BitmapWindow.CancelRgn() //this removes the floater, but leaves the bitmap region 

In this scenario, a region is created and the floater is destroyed.

Scenario Three

I want to create a floater programmatically (without using the tools). I don't want a bitmap region.

RECT Rect={10,20,50,100}; 
m_ BitmapWindow.SetAutoRgnToFloater(TRUE); 
LBitmapRgn Region(&m_ BitmapWindow); 

Scenario Four

I want to create a region programmatically (without using the tools). I don't want a floater.

RECT Rect={10,20,50,100}; 
m_ BitmapWindow.SetAutoRgnToFloater(FALSE); 
LBitmapRgn Region(&m_ BitmapWindow); 

Related Topics:

Saving a Region

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C++ Class Library Help