findLassoItemsInArea, getBounds and Transparency


#1

So in findLassoItemsInArea I can use getBounds to see if my lasso intersects with the boundaries of the components… but these components have a transparent area around them so they don’t extend to the edges of the boundaries… Am I missing any simple way to test if the lasso intersects with the non-Transparent parts of a Component?

For my Components I have:

bool CMyComponent::hitTest (int x, int y)
{
    Colour pixelColour = m_Image.getPixelAt (x, y);
    
    if (pixelColour.isTransparent())
        return false;
    
    return true;
}

I was wondering if I can use that somehow…??

Cheers,

Rail