Click here to Skip to main content
15,896,313 members
Home / Discussions / Graphics
   

Graphics

 
QuestionLarge cursors crash webex Pin
priyapradeep5-Mar-09 23:26
priyapradeep5-Mar-09 23:26 
AnswerRe: Large cursors crash webex Pin
Dave Kreskowiak6-Mar-09 3:32
mveDave Kreskowiak6-Mar-09 3:32 
QuestionBoundary Fill function assistance needed [modified] Pin
Member 33753345-Mar-09 15:30
Member 33753345-Mar-09 15:30 
AnswerRe: Boundary Fill function assistance needed Pin
Tim Craig5-Mar-09 18:56
Tim Craig5-Mar-09 18:56 
GeneralRe: Boundary Fill function assistance needed Pin
Member 33753345-Mar-09 18:59
Member 33753345-Mar-09 18:59 
GeneralRe: Boundary Fill function assistance needed Pin
Tim Craig5-Mar-09 22:25
Tim Craig5-Mar-09 22:25 
AnswerRe: Boundary Fill function assistance needed Pin
DanB19836-Mar-09 3:14
DanB19836-Mar-09 3:14 
AnswerRe: Boundary Fill function assistance needed Pin
supercat918-Mar-09 12:25
supercat918-Mar-09 12:25 
If you are using recursion as shown, even if you're drawing a bounded shape, the maximum stack depth will be roughly equal to the number of pixels in the area to be filled. For shapes of non-trivial size, that's not going to work.

Much better would be to add points to be drawn into a queue and then have a loop which takes a point from the queue, fills it, and queues up any neighbors that need filling. If you use that approach, the number of items in the queue will be limited to approximately twice the larger dimension of the shape you're filling.

Performance with that approach won't be great, but it will work. Things may be improved considerably if each queue item is a horizontal line rather than just a point. The code will be more complicated, but if written properly it will run much faster. One caveat is that there won't be any nicely-defined limit on the required queue size. On the other hand, one could design the algorithm so that when the queue is nearly full, queue items that would generate too many more queue items simply get re-queued instead of being processed. Some care would be necessary to prevent 'deadlock' conditions, but I would expect that in practice things shouldn't be too bad.
Questionabout the drawarea tool Pin
Nilam Dalvi4-Mar-09 23:00
Nilam Dalvi4-Mar-09 23:00 
GeneralEdit background on animated GIF [modified] Pin
Brady Kelly4-Mar-09 7:59
Brady Kelly4-Mar-09 7:59 
GeneralRe: Edit background on animated GIF Pin
M@dHatter4-Mar-09 8:04
M@dHatter4-Mar-09 8:04 
GeneralRe: Edit background on animated GIF Pin
Brady Kelly4-Mar-09 8:46
Brady Kelly4-Mar-09 8:46 
GeneralRe: Edit background on animated GIF Pin
M@dHatter4-Mar-09 8:53
M@dHatter4-Mar-09 8:53 
GeneralRe: Edit background on animated GIF Pin
Brady Kelly4-Mar-09 9:25
Brady Kelly4-Mar-09 9:25 
GeneralRe: Edit background on animated GIF Pin
Drew Stainton4-Mar-09 8:18
Drew Stainton4-Mar-09 8:18 
GeneralRe: Edit background on animated GIF Pin
Hans Dietrich4-Mar-09 8:25
mentorHans Dietrich4-Mar-09 8:25 
GeneralRe: Edit background on animated GIF Pin
mariahayek23-Apr-09 1:00
mariahayek23-Apr-09 1:00 
Questiondraw polygon using only two vertices Pin
Member 33753344-Mar-09 3:13
Member 33753344-Mar-09 3:13 
QuestionMap Wrapping Pin
Jim Warburton1-Mar-09 9:28
Jim Warburton1-Mar-09 9:28 
AnswerRe: Map Wrapping Pin
Pete O'Hanlon1-Mar-09 9:36
mvePete O'Hanlon1-Mar-09 9:36 
GeneralRe: Map Wrapping Pin
Jim Warburton1-Mar-09 10:54
Jim Warburton1-Mar-09 10:54 
GeneralRe: Map Wrapping Pin
Luc Pattyn1-Mar-09 11:23
sitebuilderLuc Pattyn1-Mar-09 11:23 
GeneralRe: Map Wrapping Pin
Jim Warburton1-Mar-09 12:28
Jim Warburton1-Mar-09 12:28 
GeneralRe: Map Wrapping Pin
Luc Pattyn1-Mar-09 12:31
sitebuilderLuc Pattyn1-Mar-09 12:31 
QuestionA Question about programming with DirectX 9 Pin
Kast Bloodrider28-Feb-09 6:43
Kast Bloodrider28-Feb-09 6:43 

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.