Problem using Photo-image

From: Thomas Buerger <buerger_at_iaa.tu-clausthal.de>
Date: Wed, 11 Oct 1995 17:52:33 +0100 (MET)

Hello STk-Specialists,

I want to use the Photo-image class which is now part of STk-3.0
instead of compiling the TkPixmap extension into STk-2.1.7 to show
gray-scale images. Using the TkPixmap extension I have written a
zoomable canvas starting an external process which uses the PGM-Tools
to generate a file of the zoom-region. I dont't want to load the entire
image because I have to load many images. Now that could be done directly
using the -from option of the photo widget. In pure Tcl/Tk this works but
I don't know how to realize it in STk:

(set! (zoom-pix canvas)
               (make <Image-item> :coords (list (low-x phc) (low-y phc))
                     :parent canvas
                     :anchor "se"
                     :image-name (make <Photo-image>
                                       :file (high-dat phc)
                                       :from (list xmin ymin xmax ymax))))
                                       -------------------------------
This code does not work and I think the <Photo-image> does not
recognize the :from option as in Tk. I added the following code to Image.stk:

(define-class <Photo-image> (<Tk-Image>)
  ((from :accessor from
               :init-keyword :from
               :tk-name from
               :allocation :tk-virtual)))
but only got the error:

*** Tk background error:
unknown option "-from"
**** Tk error ("") "
    (command bound to event)"

Please help me to use correctly the :from option.
(Many thanks for STk3.0 --- It is wonderfull)
                                      Thomas Buerger

-- 
**************************************************************************** 
INSTITUT FUER APPARATEBAU UND ANLAGENTECHNIK      Dipl.-Ing. Thomas Buerger
     TECHNISCHE UNIVERSITAET CLAUSTHAL            Tel.: (49)5323/72-2671
                Zellbach 5                        Fax.: (49)5323/72-2942
       D-38678 Clausthal-Z. (Germany)             
Schwerpunkt: Einsatz der Nahbereichsphotogrammetrie im Anlagenbau.
    Project: Application of close-range-photogrammetry in plant engineering.
*************************************************** FIAT LinUX ;-) *********
Received on Wed Oct 11 1995 - 17:48:44 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST