[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Read PICT from file routines
- To: email@example.com, firstname.lastname@example.org
- Subject: RE: Read PICT from file routines
- From: email@example.com (Charlie Lindahl)
- Date: Tue, 18 Sep 90 18:13:31 CDT
Awhile back, I wrote some quick routines to read in and
display PICT resources from an external file. I've seen a/some question(s)
about doing this, so I thot I'd post what I've got.
They are still a little rough, but work OK for me. I developed them
under Allegro CL 1.2.2. I've included some fairly basic documentation
in the source code.
open-my-resourcefile : Calls MAC ROM routine _OpenResFile
close-my-resourcefile : Calls MAC ROM routine _CloseResFile
display-pict-from-file : Calls MAC ROM routine _GetPicture
I also redefine *my-window* to inherit from *graphics-window* so's I can
add a new slot to the object, for use in the WINDOW-DRAW-CONTENTS routine.
;; To use:
;; 1) Find the name of a file containing a PICT resource.
;; 1) Determine the resource ID of the PICT to be read (via RESEDIT).
;; 2) Create a window of type "*my-window*"
;; 3) Execute the function "display-pict-from-file".
;; 1. Run under Allegro CL 1.2.2. I haven't tried later releases.
;; 2. Must have preloaded *graphics-window* definitions.
Hope this helps someone. I've posted the code at cambridge.apple.com
Charlie S. Lindahl
Automation and Robotics Research Institute
University of Texas at Arlington
Internet EMAIL: firstname.lastname@example.org
Standard disclaimer: Ain't no opinion but my own.