PictureBox StoreImage and Refresh

Started by mike, October 02, 2014, 08:39:57 AM

Previous topic - Next topic

mike

well, I'm using these functions and the result is not expected, because instead of drawing the last stored image only cleans the picture  box...
my opendcl version is 8.0.0.8 and autocad 2012 32 bits

help me


owenwengerd

You're more likely to get help if you include a minimal sample that demonstrates the problem, or at least provide sufficient detail for someone to reproduce it.
Owen Wengerd (Outside The Box) / ManuSoft

mike

Well Owen, im drawing in a picture box, i trace some segments of lines and i want to delete a segment, my idea is save an image previous to draw the last segment, and if i wish to delete, restore the last image saved...something as follow:

(defun draw_segment( / )
(dcl-PictureBox-StoreImage DefProy/Form1/PictureBox1)
.
.
.
)

(defun erase_segment( / )
.
.
(dcl-PictureBox-Refresh DefProy/Form1/PictureBox1)
)

Hope if that is enough to explain me...
thanks

owenwengerd

I can confirm that the behavior of (dcl-PictureBox-Refresh) does not match the documentation. I'm not sure if there was an intentional design change and the documentation didn't get updated, or the change was made for some other purposes without realizing its side effects. In any case, I have fixed the code for the next build so the function behaves as documented. In the meantime, try using (dcl-Control-Redraw) instead. It should have the same effect.
Owen Wengerd (Outside The Box) / ManuSoft

mike

Hello Owen,
apparently are only invested the concepts of the functions in the help!
:)