|
Post by ptitjoz on Jan 16, 2021 12:34:59 GMT 1
Hello is it possible to resize a CANVAS? (with HUG) If not, is it possible to have 2 CANVAS and choose which one to draw in? Thank you ! Best regards
|
|
|
Post by Pjot on Jan 16, 2021 18:26:57 GMT 1
Hi ptitjoz, Resizing a canvas is not possible, however, you can use the DRAW directive to define the current active canvas to draw to. HTH Peter
|
|
|
Post by ptitjoz on Jan 19, 2021 11:29:45 GMT 1
Thanks for your explanations. Best regards
|
|
|
Post by ptitjoz on Jan 21, 2021 14:48:23 GMT 1
Hello, When I draw a line with the "LINE" directive, is there any way to tell which pixels have been "lit"? Regard
|
|
|
Post by Pjot on Jan 22, 2021 9:26:29 GMT 1
Hi ptitjoz,
This is always a hard thing to do. When you do not need performance, I'ld just check every pixel on the GTK canvas and verify the color.
In case of OpenGL you maybe could do something with double buffering. However, you probably need particular OpenGL calls for this.
BR Peter
|
|
|
Post by ptitjoz on Jan 22, 2021 11:49:28 GMT 1
Yes I tried to read all the pixels by a double loop but it is really too long. I will look for another method
Regards
|
|