Ejemplo n.º 1
0
//---------------------------------------------------------------------------
void* __fastcall TDIBImage::GetScanline(int Row)
{
    if ( m_OpenedPixels == NULL )
        return NULL;
    if ( GetEmpty() == true )
        return NULL;
    if ( Row > GetHeight() - 1 || Row < 0 )
        return NULL;

    int inv_row = GetHeight() - 1 - Row;

    int width = ((m_DIBInfo.bmiHeader.biWidth * m_DIBInfo.bmiHeader.biBitCount + 31)/32) * 4;
    return (void *)(m_OpenedPixels + width*inv_row); // TODO: CHANGE THIS!
}
Ejemplo n.º 2
0
inline bitset_t StoneBoard::GetColor(HexColor color) const
{
    BenzeneAssert(HexColorUtil::isValidColor(color));
    if (color == EMPTY) return GetEmpty();
    return m_stones[color] & Const().GetLocations();
}