Click here to Skip to main content
15,900,258 members
Home / Discussions / Graphics
   

Graphics

 
AnswerRe: The Solution Pin
GTaylor5514-Jun-07 0:53
GTaylor5514-Jun-07 0:53 
QuestionBlank Image Detection Pin
JoeGonzalez2-Jun-07 7:24
JoeGonzalez2-Jun-07 7:24 
Questionpbuffers [modified] Pin
XTAL2561-Jun-07 14:59
XTAL2561-Jun-07 14:59 
QuestionNewbie Camera Math Question Pin
joshp12171-Jun-07 9:05
joshp12171-Jun-07 9:05 
QuestionCropping Surrounding White Area Pin
zubair_ahmed31-May-07 20:56
zubair_ahmed31-May-07 20:56 
AnswerRe: Cropping Surrounding White Area Pin
Mark Salsbery1-Jun-07 5:06
Mark Salsbery1-Jun-07 5:06 
AnswerRe: Cropping Surrounding White Area Pin
Ian Shlasko1-Jun-07 7:13
Ian Shlasko1-Jun-07 7:13 
QuestionPath.IsVisible() Problem! Pin
nermsk30-May-07 11:22
nermsk30-May-07 11:22 
Hi everyone...

I have a concrete problem but I will firstly introduce it in an abstract:

An algorithm scans a 24-bit bitmap data, an array of bytes. When the loop encounters a white pixel it adds the Point to the array of Points.

After the loop had scanned the entire bitmap I use the array of points to create the GraphicsPath

I draw the path and I get exactly what I want.

The problem is when checking for a hit test!

I use the myPath.IsVisible(point.X, point.Y) and here is where the problem occurs!

I have analyzed the array of points contained within the path object and have noticed that the myPath.IsVisible(point.X, point.Y) only return true in ONE SPECIAL CASE!

When the loop scans the first line of the bitmap and runs into a white pixel it will add that point to the array.

So this very point, the first white one in the first bitmap line, is the crucial one!

How? Well it seems that every point having its X coordinate greater than the very first point's X coordinate gets accounted form when calling myPath.IsVisible(point.X, point.Y). This means that every point in the path's array of points whose X coordinate is lesser than the first co ordinate's X will not be accounted for the hit test!
This manifests in way that, if operating with an irregular elliptic resembling shape, only the right side is accounted for the hit test, not the left one!

I am more that happy to post the project for viewing and examining, it 100+ lines of code, but if someone has a solution to this I would be more than happy to hear it.

By the way, I have a good experience with wi32 HRGN structures, they did not give me such problems!

Thanks to everyone in advance!
AnswerRe: Path.IsVisible() Problem! Pin
Mark Salsbery30-May-07 15:31
Mark Salsbery30-May-07 15:31 
GeneralRe: Path.IsVisible() Problem! Pin
nermsk30-May-07 20:29
nermsk30-May-07 20:29 
GeneralRe: Path.IsVisible() Problem! Pin
nermsk31-May-07 10:26
nermsk31-May-07 10:26 
QuestionLooking for bit depth conversion library/class Pin
Sepharo30-May-07 5:51
Sepharo30-May-07 5:51 
QuestionPhotoshop...Help Pin
friendship30-May-07 0:37
friendship30-May-07 0:37 
AnswerRe: Photoshop...Help Pin
bigphish10-Jun-07 20:11
bigphish10-Jun-07 20:11 
AnswerRe: Photoshop...Help Pin
Drew Stainton17-Jul-07 19:55
Drew Stainton17-Jul-07 19:55 
Question8 bit bmp Pin
himuskanhere29-May-07 20:56
himuskanhere29-May-07 20:56 
QuestionRe: 8 bit bmp Pin
Mark Salsbery30-May-07 5:11
Mark Salsbery30-May-07 5:11 
AnswerRe: 8 bit bmp Pin
himuskanhere31-May-07 23:00
himuskanhere31-May-07 23:00 
GeneralRe: 8 bit bmp Pin
Mark Salsbery1-Jun-07 4:54
Mark Salsbery1-Jun-07 4:54 
GeneralRe: 8 bit bmp Pin
himuskanhere4-Jun-07 2:00
himuskanhere4-Jun-07 2:00 
GeneralRe: 8 bit bmp Pin
Mark Salsbery4-Jun-07 4:21
Mark Salsbery4-Jun-07 4:21 
GeneralRe: 8 bit bmp Pin
himuskanhere4-Jun-07 18:45
himuskanhere4-Jun-07 18:45 
GeneralRe: 8 bit bmp Pin
Mark Salsbery5-Jun-07 4:43
Mark Salsbery5-Jun-07 4:43 
GeneralRe: 8 bit bmp Pin
himuskanhere11-Jun-07 1:38
himuskanhere11-Jun-07 1:38 
QuestionProblem While Restarting Filter Graph Pin
amit_007_bond29-May-07 20:47
amit_007_bond29-May-07 20:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.