Exemplo n.º 1
0
////////////////////////////////////////////////////////////
/// Tells whether the smoothing filter is enabled or not on an image
////////////////////////////////////////////////////////////
sfBool sfImage_IsSmooth(sfImage* Image)
{
    CSFML_CALL_RETURN(Image, IsSmooth(), sfFalse);
}
Exemplo n.º 2
0
void CXTPMarqueeCtrl::OnDrawMarquee(CDC* pDC, CRect rcClient)
{
    int nEdge = (m_bWinThemed? 3: 1);

    rcClient.DeflateRect(nEdge, nEdge);
    pDC->IntersectClipRect(rcClient);

    // calculate marquee size.
    int x  = IsVertical()? rcClient.left: m_nPos;
    int y  = IsVertical()? m_nPos : rcClient.top;

    // determine the dimensions for the bitmap.
    int cx = IsVertical()? rcClient.Width(): m_cxChunk;
    int cy = IsVertical()? m_cxChunk: rcClient.Height();

    // create a memory device context, and select the bitmap into it.

    CBitmap bmpChunk;
    bmpChunk.CreateCompatibleBitmap(pDC, cx, cy);

    CXTPCompatibleDC dcChunk(pDC, &bmpChunk);

    for (int i = 0; i < _countof(m_chAlpha); ++ i)
    {
        dcChunk.BitBlt(0, 0, cx, cy, pDC, x, y, SRCCOPY);

        // draw the chunk using the memory dc.
        CXTPEmptyRect rcChunk;

        if (IsVertical())
        {
            rcChunk.right  = cx;
            rcChunk.bottom = m_cxChunk - (IsSmooth() ? 0 : m_nGap);
        }
        else
        {
            rcChunk.right  = m_cxChunk - (IsSmooth() ? 0 : m_nGap);
            rcChunk.bottom = cy;
        }

        if (m_bWinThemed)
        {
            m_themeWrapper.DrawThemeBackground(dcChunk,
                                               IsVertical()? PP_CHUNKVERT: PP_CHUNK, PBS_NORMAL, &rcChunk, NULL);
        }
        else
        {
            dcChunk.FillSolidRect(rcChunk, m_crChunk);
        }

        if (XTPDrawHelpers()->m_pfnAlphaBlend)
        {
            BLENDFUNCTION bf;
            bf.BlendOp = AC_SRC_OVER;
            bf.BlendFlags = 0;
            bf.SourceConstantAlpha = m_chAlpha[i];
            bf.AlphaFormat = 0;

            XTPDrawHelpers()->m_pfnAlphaBlend(pDC->GetSafeHdc(), x, y, cx, cy, dcChunk, 0, 0, cx, cy, bf);
        }
        else
        {
            ::BitBlt(pDC->GetSafeHdc(), x, y, cx, cy, dcChunk, 0, 0, SRCCOPY);
        }

        if (IsVertical())
        {
            y += cy;
        }
        else
        {
            x += cx;
        }
    }
}
Exemplo n.º 3
0
sfBool sfRenderTexture_IsSmooth(const sfRenderTexture* renderTexture)
{
    CSFML_CALL_RETURN(renderTexture, IsSmooth(), sfFalse);
}