Esempio n. 1
0
CtrlSliderCursor::~CtrlSliderCursor()
{
    m_rVariable.delObserver( this );
    SKINS_DELETE( m_pImgUp );
    SKINS_DELETE( m_pImgDown );
    SKINS_DELETE( m_pImgOver );
}
Esempio n. 2
0
void CtrlImage::draw( OSGraphics &rImage, int xDest, int yDest )
{
    const Position *pPos = getPosition();
    if( pPos )
    {
        int width = pPos->getWidth();
        int height = pPos->getHeight();

        if( m_resizeMethod == kScale )
        {
            // Use scaling method
            if( width > 0 && height > 0 )
            {
                if( width != m_pImage->getWidth() ||
                    height != m_pImage->getHeight() )
                {
                    OSFactory *pOsFactory = OSFactory::instance( getIntf() );
                    // Rescale the image with the actual size of the control
                    ScaledBitmap bmp( getIntf(), m_rBitmap, width, height );
                    SKINS_DELETE( m_pImage );
                    m_pImage = pOsFactory->createOSGraphics( width, height );
                    m_pImage->drawBitmap( bmp, 0, 0 );
                }
                rImage.drawGraphics( *m_pImage, 0, 0, xDest, yDest );
            }
        }
        else
        {
            // Use mosaic method
            while( width > 0 )
            {
                int curWidth = __MIN( width, m_pImage->getWidth() );
                height = pPos->getHeight();
                int curYDest = yDest;
                while( height > 0 )
                {
                    int curHeight = __MIN( height, m_pImage->getHeight() );
                    rImage.drawGraphics( *m_pImage, 0, 0, xDest, curYDest,
                                         curWidth, curHeight );
                    curYDest += curHeight;
                    height -= m_pImage->getHeight();
                }
                xDest += curWidth;
                width -= m_pImage->getWidth();
            }
        }
    }
}
Esempio n. 3
0
CtrlRadialSlider::~CtrlRadialSlider()
{
    m_rVariable.delObserver( this );
    SKINS_DELETE( m_pImgSeq );
}
Esempio n. 4
0
CtrlImage::~CtrlImage()
{
    SKINS_DELETE( m_pImage );
}
Esempio n. 5
0
CtrlButton::~CtrlButton()
{
    SKINS_DELETE( m_pImgUp );
    SKINS_DELETE( m_pImgDown );
    SKINS_DELETE( m_pImgOver );
}