Page 1 of 1

(slide_image) is working???

Posted: Sun Aug 19, 2001 11:35 am
by ordiales
Hi again...

I continue testing LISP function from Intellicad 2001. :-)

Now... I think (slide_image) is not working from LISP...

I define a simple DCL like:

sino:dialog {
label = "Prueba";
:row {
:image {
key = "logo";
width = 40;
height=15;
}
:button{
label = "Si";
key = "si";
is_default = true;
fixed_width = true;
}
}
} // Dialog

And I want DRAW something (a SLIDE) from LISP:

(defun i_test( / id x y)
(setq id (load_dialog "prueba.dcl"))
(setq x (dimx_tile "logo") y (dimy_tile "logo"))
(start_image "logo")
(slide_image 0 0 x y "milogo.sld")
(end_image)

(action_tile "si" "(done_dialog)")

;
(start_dialog)
(unload_dialog id)
)

; Well...

I was testing (slide_image...) with ".sld", w/o ".sld" with other files like .emf and .wmf and differents paths...

It works in Autocad, but in Intellicad it doesn't shows ANYTHING...

Any Idea????

Posted: Sun Aug 19, 2001 1:39 pm
by avaernes
I have discovered this too. It only works with .sld type files, not metafiles.

Posted: Mon Aug 20, 2001 12:31 am
by viire
I had same problem. My solution was this:

Try to change IntelliCAD's background color into white (or black if you are using white already).

When I used white background, all slide images in DCL dialog box were only black boxes.

Posted: Mon Aug 20, 2001 1:15 am
by avaernes
Image tiles/buttons are by far the most buggy part of the Intellicad lisp engine. Errors include:
- they do not display correctly the ACI colors (fill_image)
- Massive memory leaks when a slide image is displayed. If different slide images are displayed in the same image tile within the same dcl session, it will eventually crash intellicad (and even your system!). This is one of the worst Intellicad bugs.
- Several color attributes do not work (dialog_background, graphics_background etc.)
- Slides will sometimes fail to display given certain combinations of main grapichs background and image tile background. The color of the graphics background when the slide was created is also a factor.

Workarounds: Use color 251 for image tile background. This is the best all-round color, all slides will be visible under all conditions.

Your example above is missing a (fill_image) call before the (slide_image) which is probably why it is not working:
(fill_image 0 0 x y 251)
(slide_image 0 0 x y "milogo.sld")

Posted: Wed Aug 22, 2001 12:17 am
by viire
Thanks !!!

I had specified color 0, like:
(fill_image 0 0 x y 0)

...which caused problems....but color
251 works fine.