Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

VID Problem: not enough memory

 [1/13] from: robert:muench:robertmuench at: 30-Oct-2002 16:15


Hi, I have a strange problem I can't solve. Please try the following code: rebol [] arrows: [ pen 200.200.200 fill-pen red line -15x-45 15x-15 polygon 15x-15 7x-18 11x-22 line 15x-15 15x45 polygon 15x45 12x37 18x37 line -15x-45 -75x60 polygon -75x60 -73x51 -68x54 line -15x-45 -45x-15 polygon -45x-15 -41x-22 -37x-18 ] view make face probe compose/deep [ size: 300x300 effect: [draw [(arrows)]] ] Any idea what the problem is? Is it a problem that I have negative coordinates? Robert

 [2/13] from: cyphre:seznam:cz at: 30-Oct-2002 17:01


Hi Robert, This is one of very old DRAW bugs whose aren't still fixed :-( It has something to do with bug in polygon filling routine(?)IMO. Please send it to feedback so maybe RT will finaly fix it in the near future. regards, Cyphre

 [3/13] from: carl:cybercraft at: 31-Oct-2002 7:06


On 31-Oct-02, Robert M. Muench wrote:
> Hi, I have a strange problem I can't solve. Please try the following > code:
<<quoted lines omitted: 16>>
> Any idea what the problem is? Is it a problem that I have negative > coordinates? Robert
It would seem View doesn't like polygons when both the points are all outside the face and some of them are negative. The first three examples here work but the last one gives the out-of-memory error... ; all points in face arrows: [ pen 200.200.200 fill-pen red polygon 15x45 12x37 18x37 ] view make face probe compose/deep [ size: 300x300 effect: [draw [(arrows)]] ] ; 2 out of 3 points negative, 1 inside face arrows: [ pen 200.200.200 fill-pen red polygon -15x-45 -12x-37 18x37 ] view make face probe compose/deep [ size: 300x300 effect: [draw [(arrows)]] ] ; all points outside face, but all positive arrows: [ pen 200.200.200 fill-pen red polygon 415x445 412x437 418x437 ] view make face probe compose/deep [ size: 300x300 effect: [draw [(arrows)]] ] ; all points have one negative value (this one fails) arrows: [ pen 200.200.200 fill-pen red polygon -15x45 -12x37 -18x37 ] view make face probe compose/deep [ size: 300x300 effect: [draw [(arrows)]] ] Is this problem also in the beta Views? -- Carl Read

 [4/13] from: robert:muench:robertmuench at: 30-Oct-2002 19:48


> -----Original Message----- > From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]
<<quoted lines omitted: 5>>
> :-( It has something to do with bug in polygon filling > routine(?)IMO.
Hi Cyphre, so I'm stuck... I try to remove the polygon fill. Now that I made my cool arrow-drawing routine I face such a bug :-((. Thanks for the tip.
> Please send it to feedback so maybe RT will > finaly fix it in the near future.
Ok, did it. Robert

 [5/13] from: robert:muench:robertmuench at: 31-Oct-2002 11:05


> -----Original Message----- > From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]
<<quoted lines omitted: 4>>
> It would seem View doesn't like polygons when both the points > are all outside the face and some of them are negative.
Hi Carl, hey great stuff! I have to say that I was to lazy yesterday to check all combinations ;-)). Thanks a lot. I try to change my code. Hmm... This means I need a clipping routine now... Has someone written a clipping routine for lines already? Robert

 [6/13] from: anton:lexicon at: 1-Nov-2002 0:54


I've been thinking about doing it. Maybe you encourage me to get onto it... mmm... But I've got a lines-intersect? function in http://www.lexicon.net/anton/rebol/library/graphics.r and a demo of it: http://www.lexicon.net/anton/rebol/demo/demo-intersect.r This might help in determining whether an edge of the clip area intersects the line. It can be optimized in this case, because the lines that form the edges of the clip area are horizontal and vertical - straight lines. But it may help get the clipping routine working quickly, anyway. Anton.

 [7/13] from: carl:cybercraft at: 1-Nov-2002 3:18


On 31-Oct-02, Robert M. Muench wrote:
>> -----Original Message----- >> From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]
<<quoted lines omitted: 8>>
> code. Hmm... This means I need a clipping routine now... Has someone > written a clipping routine for lines already? Robert
I couldn't cause lines to misbehave, so they may be okay. I hadn't tested them beyond two points though. -- Carl Read

 [8/13] from: robert::muench::robertmuench::de at: 31-Oct-2002 17:19


> -----Original Message----- > From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]
<<quoted lines omitted: 4>>
> But I've got a lines-intersect? function in > http://www.lexicon.net/anton/rebol/library/graphics.r
Hi, thanks a lot :-) I take a look at it.
> It can be optimized in this case, because the > lines that form the edges of the clip area are > horizontal and vertical - straight lines.
Yep, I know and I will extend the code for this case. Thanks! Robert

 [9/13] from: carl:cybercraft at: 1-Nov-2002 21:13


Speaking of draw problems, do others get bits of the white line showing with the following code? ... view layout [ box blue effect [ draw [ pen white line 5x5 95x80 pen black line 95x80 5x5 ] ] ] As I do on Amiga. As the black line is drawn between the same two points as the white one, shouldn't it perfectly cover the white line? -- Carl Read

 [10/13] from: gchiu:compkarori at: 1-Nov-2002 22:43


On Fri, 01 Nov 2002 21:13:40 +1200 Carl Read <[carl--cybercraft--co--nz]> wrote:
>view layout [ > box blue effect [
<<quoted lines omitted: 10>>
>points as the white one, shouldn't it perfectly cover the >white line?
Yep, XP I get the dotted white line. Perhaps it's because different calculations are involved in drawing the second line? Of course, if you do pen black line 5x5 95x80 then it is a solid black. -- Graham Chiu

 [11/13] from: sunandadh:aol at: 1-Nov-2002 4:43


Carl:
> Speaking of draw problems, do others get bits of the white line > showing with the following code? ...
I get a line of black dashes and white dots. Sounds like the same result. Win98 -- REBOL/View 1.2.1.3.1 21-Jun-2001 Sunanda

 [12/13] from: carl:cybercraft at: 1-Nov-2002 23:52


On 01-Nov-02, Graham Chiu wrote:
> On Fri, 01 Nov 2002 21:13:40 +1200 > Carl Read <[carl--cybercraft--co--nz]> wrote:
<<quoted lines omitted: 18>>
> different calculations are involved in drawing the second > line?
I'd think same calculations, different direction. For instance, both of these are valid ways to draw a line from 2x1 to 4x2... XXXXXXX XX XXX XXXX XX XXXXXXX XXXXXXX XX XXXX XXX XX XXXXXXX It's just that they don't match - unless you turn the bottom one upside down. Anyway, I'll submit it to feedback. -- Carl Read

 [13/13] from: rotenca:telvia:it at: 1-Nov-2002 12:20


Hi all,
> Yep, XP I get the dotted white line. Perhaps it's because > different calculations are involved in drawing the second > line? Of course, if you do > > pen black line 5x5 95x80 > > then it is a solid black.
RT should normalize the line before drawing it (drawing always fro left-top to right-bottom). Stuff for feedback. --- Ciao Romano

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted