Gets the visible rectangle of the displayed bitmap.
#include "ltwrappr.h"
L_VOID LBitmapWindow::GetBitmapVisibleRect(pRect)
Pointer to the rectangle to be updated with the visible part of the displayed bitmap.
None.
Win32, x64.
L_INT LBitmapWindow__GetBitmapVisibleRectExample(HWND hWndParent){L_INT nRet;LBitmapWindow LeadBWnd ;nRet = LeadBWnd.Load(MAKE_IMAGE_PATH(TEXT("image1.cmp"))) ;if (nRet == SUCCESS){L_UINT uToolType, uRgnType;RECT rect ;if (LeadBWnd.CreateWnd( hWndParent, TRUE, 0, 0, 100, 100) == NULL)return 0;uToolType = LeadBWnd.GetToolType() ;if (uToolType != TOOL_REGION)LeadBWnd.SetToolType(TOOL_REGION) ;uRgnType = LeadBWnd.GetRegionType() ;if (uRgnType != REGION_TYPE_FREE_HAND)LeadBWnd.SetRegionType(REGION_TYPE_FREE_HAND) ;//... do some process//...if (LeadBWnd.HasRgn() == TRUE)LeadBWnd.CancelRgn() ;LeadBWnd.ZoomIn() ;LeadBWnd.GetBitmapVisibleRect(&rect) ;rect.left -= 10 ;rect.top -= 10 ;rect.right -= 10;rect.bottom-= 10;nRet =LeadBWnd.Move(rect);if(nRet !=SUCCESS)return nRet;LeadBWnd.FitToParent() ;GRADIENTDLGPARAMS GradDlgParm;if(LeadBWnd. DialogEffect()->DoModalGetGradient(hWndParent)==SUCCESS){nRet =LeadBWnd.GetGradientParameters(&GradDlgParm);if(nRet !=SUCCESS)return nRet;//…nRet =LeadBWnd.SetGradientParameters(&GradDlgParm);if(nRet !=SUCCESS)return nRet;if (LeadBWnd.GetGradientStyle() != EFX_GRADIENT_LINE2_C_TO_LT_AND_RB)LeadBWnd.SetGradientStyle(EFX_GRADIENT_LINE2_C_TO_LT_AND_RB) ;}TRANSITIONDLGPARAMS TransDlgParm;if(LeadBWnd. DialogEffect()->DoModalGetTransition(hWndParent)==SUCCESS){LeadBWnd.GetTransitionParameters(&TransDlgParm);//…LeadBWnd.SetTransitionParameters(&TransDlgParm);if (LeadBWnd.GetTransition() != EFX_TRANS_SOLID)LeadBWnd.SetTransition(EFX_TRANS_SOLID) ;if (LeadBWnd.GetTransitionEffect() != EFX_TRANS_UPWARD_DIAG)LeadBWnd.SetTransitionEffect(EFX_TRANS_UPWARD_DIAG) ;if (LeadBWnd.GetMaxTransitionPasses() == 1)LeadBWnd.SetMaxTransitionPasses(3) ;}EFFECTDLGPARAMS EfxDlgParm;if(LeadBWnd. DialogEffect()->DoModalGetEffect(hWndParent)==SUCCESS){LeadBWnd.DialogEffect()->GetEffectParams(&EfxDlgParm,sizeof(EfxDlgParm));nRet =LeadBWnd.SetEffectParameters(&EfxDlgParm);if(nRet !=SUCCESS)return nRet;if (LeadBWnd.GetMaxEffectPasses() == 1)LeadBWnd.SetMaxEffectPasses(3) ;}if (LeadBWnd.GetPaintEffect() != EFX_EFFECT_WIPE_L_TO_R)LeadBWnd.SetPaintEffect(EFX_EFFECT_WIPE_L_TO_R) ;if (LeadBWnd.GetRgnFrameType() != RGNFRAME_STATIC)LeadBWnd.SetRgnFrameType(RGNFRAME_STATIC) ;}elsereturn nRet;return SUCCESS ;}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
