本文整理汇总了C++中OSGraphics::getHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ OSGraphics::getHeight方法的具体用法?C++ OSGraphics::getHeight怎么用?C++ OSGraphics::getHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OSGraphics
的用法示例。
在下文中一共展示了OSGraphics::getHeight方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateRectRgn
void Win32Graphics::drawGraphics( const OSGraphics &rGraphics, int xSrc,
int ySrc, int xDest, int yDest, int width,
int height )
{
if( width == -1 )
{
width = rGraphics.getWidth();
}
if( height == -1 )
{
height = rGraphics.getHeight();
}
// Create the mask for transparency
HRGN mask = CreateRectRgn( xSrc, ySrc, xSrc + width, ySrc + height );
CombineRgn( mask, ((Win32Graphics&)rGraphics).getMask(), mask, RGN_AND );
OffsetRgn( mask, xDest - xSrc, yDest - ySrc );
// Copy the image
HDC srcDC = ((Win32Graphics&)rGraphics).getDC();
SelectClipRgn( m_hDC, mask );
BitBlt( m_hDC, xDest, yDest, width, height, srcDC, xSrc, ySrc, SRCCOPY );
// Add the source mask to the mask of the graphics
CombineRgn( m_mask, mask, m_mask, RGN_OR );
DeleteObject( mask );
}
示例2: getIntf
void Win32Graphics::drawGraphics( const OSGraphics &rGraphics, int xSrc,
int ySrc, int xDest, int yDest, int width,
int height )
{
// check and adapt to source if needed
if( !checkBoundaries( 0, 0, rGraphics.getWidth(), rGraphics.getHeight(),
xSrc, ySrc, width, height ) )
{
msg_Err( getIntf(), "nothing to draw from graphics source" );
return;
}
// check destination
if( !checkBoundaries( 0, 0, m_width, m_height,
xDest, yDest, width, height ) )
{
msg_Err( getIntf(), "out of reach destination! pls, debug your skin" );
return;
}
// Create the mask for transparency
HRGN mask = CreateRectRgn( xSrc, ySrc, xSrc + width, ySrc + height );
CombineRgn( mask, ((Win32Graphics&)rGraphics).getMask(), mask, RGN_AND );
OffsetRgn( mask, xDest - xSrc, yDest - ySrc );
// Copy the image
HDC srcDC = ((Win32Graphics&)rGraphics).getDC();
SelectClipRgn( m_hDC, mask );
BitBlt( m_hDC, xDest, yDest, width, height, srcDC, xSrc, ySrc, SRCCOPY );
// Add the source mask to the mask of the graphics
CombineRgn( m_mask, mask, m_mask, RGN_OR );
DeleteObject( mask );
}
示例3: SetWindowPos
void Win32Tooltip::show( int left, int top, OSGraphics &rText )
{
// Source drawable
HDC srcDC = ((Win32Graphics&)rText).getDC();
int width = rText.getWidth();
int height = rText.getHeight();
// Set the window on top, resize it and show it
SetWindowPos( m_hWnd, HWND_TOPMOST, left, top, width, height, 0 );
ShowWindow( m_hWnd, SW_SHOW );
HDC wndDC = GetDC( m_hWnd );
BitBlt( wndDC, 0, 0, width, height, srcDC, 0, 0, SRCCOPY );
ReleaseDC( m_hWnd, wndDC );
}