Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!lll-lcc!ames!ucbcad!ucbvax!hplabs!cae780!amdcad!sun!david From: david@sun.UUCP Newsgroups: comp.graphics Subject: Re: Bounding boxes and drawing dashed vectors in SunView Message-ID: <14063@sun.uucp> Date: Wed, 25-Feb-87 15:36:40 EST Article-I.D.: sun.14063 Posted: Wed Feb 25 15:36:40 1987 Date-Received: Fri, 27-Feb-87 23:46:42 EST References: <2601@phri.UUCP> Organization: Sun Microsystems, Inc. - Mtn View, CA Lines: 43 Disclaimer: These are my personal opinions and Sun Microsystems would be just as happy if I never read news... In article <2601@phri.UUCP> roy@phri.UUCP (Roy Smith) writes: > I have two questions about the SunView pixrect package. SunView and pixrects are two different packages. >We are trying to make movies on a Sun-3 by >doing screendumps of the frames we want and then doing screenloads of each >in turn... Why don't you just have the program which computes the frames write rasterfiles itself with pr_dump, or write your own screendump which takes x, y, w, h arguments? > The only way I can see to find the bounding box is by brute force >raster scanning of the pixrect using pr_get(), but this is bound to be >slow. Is there a faster way? Sure. You can use a series of rops to efficiently "or" large areas into a single pixel for testing. It only takes log2 n + log2 m rops to smash an n x m area into a single pixel. (For more ideas on creative uses of rasterops, read the blue Smalltalk book.) The memory pixrect image data format is documented, so if you want to get your hands dirty you can scan through it yourself. Watch out for scan-line padding! (You didn't ask, but I think you would be better off storing the frames in memory in a simple run-length encoded format and expanding them on the fly for display.) > My second question concerns drawing dashed vectors. I want to >create a rubber-band effect (you paste down one endpoint of a vector, and >drag the mouse to the other endpoint, with a dashed vector being drawn so >you can see what it will look like when you release the mouse button). Support for textured vectors was introduced in SunOS Release 3.2. Upgrade thyself! -- David DiGiacomo {decvax, ihnp4, ucbvax}!sun!david david@sun.arpa Sun Microsystems, Mt. View, CA (415) 691-7495