Click here to Skip to main content
15,887,952 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What I want is something more refined than just the character/symbol rect, I want to detect overlapping only when the black parts touch so that custom symbols could be drawn at any position and a close as possible, possibly even allowed to overlap.

Would using paths allow one to detect whether the characters/symbols overlap and is there some really simple code? Can't seem to find any in my searches. Thanks.
Posted

Well, if two bit patterns overlap, then the bitwise XOR (^) and OR (|) operations between them give different results.
It may be a starting point.
 
Share this answer
 
v2
if (CountOfBlackBits(hBmpComposed) <
    CountOfBlackBits(hBmpA) +
    CountOfBlackBits(hBmpB)) {
  // yes :)
...
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900