CLIM mail archive
[Prev][Next][Index][Thread]
Questions...about ICONS
-
To: basham@aio.jsc.nasa.gov, naha@yukon.scrc.symbolics.com
-
Subject: Questions...about ICONS
-
From: Mark Nahabedian <naha@yukon.scrc.symbolics.com>
-
Date: Wed, 29 May 1991 13:45-0400
-
Cc: CLIM@BBN.COM
-
Character-Type-Mappings: (1 0 (NIL 0) (SAGE:SANS-SERIF-BODY SAGE::LISP :NORMAL) "HL12B") (2 0 (NIL 0) (:DEVICE-FONT FONTS:HL12 :NORMAL) "HL12") (3 0 (NIL 0) (SAGE:SANS-SERIF-BODY :ITALIC :NORMAL) "HL12I") (4 0 (NIL 0) (:DEVICE-FONT FONTS:HL12I :NORMAL) "HL12I") (5 0 (NIL 0) (SAGE:SANS-SERIF-BODY :ROMAN :NORMAL) "HL12") (6 0 (NIL 0) (SAGE:SANS-SERIF-BODY SAGE::TYPEWRITER :NORMAL) "CPTFONT") (7 0 (NIL 0) (:DEVICE-FONT FONTS:CPTFONT :NORMAL) "CPTFONT")
-
Fonts: CPTFONT, HL12B, HL12, HL12I, HL12I, HL12, CPTFONT, CPTFONT
-
In-Reply-To: <19910529142117.4.BRYAN@[128.157.59.4]>
Date: Wed, 29 May 1991 10:21 EDT
From: basham@aio.jsc.nasa.gov
Hello Mark,
> 2) The term "bitmap" does not appear in the Symbolics' CLIM 1.0
> documentation. Can bitmaps be implemented in CLIM? Are they
> some type of "design" or "pattern"?
> In a related, but more general, question: is there a taxonomy of
> designs?
>
> See the documentation for CLIM:DRAW-ICON.
I did not find this function in my copy of Symbolics' 1.0 prerelease. However,
I did find, via "Find Symbols \"icon\" :Packages CLIM", CLIM:ICONIC-VIEW and
the CLIM:+ICONIC-VIEW+ instance. Will these support iconic views of an object
in the future release?
-BASH
This is the first I've heard of them. They're not documented. The
navfun demo seems to use it.
The documentation for DRAW-ICON may not have made it into the
"Preliminary Release" documentation. Here it is:
1clim:draw-icon2 3stream icon x y4 0 3Function
0 5Draws the "icon" 3icon5 on 3stream5 at the position (3x5,3y5).2 3icon5 is a design
0 5created2 5by calling 1clim:make-pattern5, for example,
0 6(make-pattern #2A((0 0 0 1 1 0 0 0)
0 6 (0 0 1 1 1 1 0 0)
0 6 (0 1 1 1 1 1 1 0)
0 6 (1 1 1 0 0 1 1 1)
0 6 (1 1 1 0 0 1 1 1)
0 6 (0 1 1 1 1 1 1 0)
0 6 (0 0 1 1 1 1 0 0)
0 6 (0 0 0 1 1 0 0 0))
0 6 (list +background+ +foreground+))
0 1clim:make-pattern2 3array designs2 0 3Function
0 5Creates a pattern design that has 6(array-dimension 2d-array7 60)5 cells
0 5in the vertical direction and 6(array-dimension 2d-array 1)5 cells2 5in
0 5the horizontal direction.2
0 3array5 must be a two-dimensional array of non-negative integers,
0 5each2 5of which is less than the length of 3designs5.2 3designs5 must be a
0 5sequence2 5of designs.2 5The design in cell (i,j) of the resulting pattern is
0 5the 3n5th2 5element of 3designs5, if 3n5 is the value of 6(aref array i j)5.2 5For
0 5example, 3array5 can be a bit-array and 3designs5 can be a list of two
0 5designs, the design drawn for 0 and the one drawn for 1.
0 5Each cell of a pattern can be regarded as a hole that allows the de-
0 5sign2 5in it to show through.2 5Each cell might have a different design in
0 5it.2 5The portion of the design that shows through a hole is the portion
0 5on2 5the part of the drawing plane where the hole is located.2 5In other
0 5words,2 5incorporating a design into a pattern does not change its
0 5alignment to2 5the drawing plane, and does not apply a coordinate
0 5transformation to the design.2 5Drawing a pattern collects the pieces of
0 5designs that show through all2 5the holes and draws the pieces where
0 5the holes lie on the drawing plane.2 5The pattern is completely trans-
0 5parent outside the area defined by the array.
0 5Each cell of a pattern occupies a 1 by 1 square.2 5You can use
0 1clim:transform-region5 to scale the pattern to a different cell size
0 5and shape, or to rotate the pattern so that the rectangular cells be-
0 5come2 5diamond-shaped.2 5Applying a coordinate transformation to a
0 5pattern does not2 5affect the designs that make up the pattern.2 5It only
0 5changes the2 5position, size, and shape of the cells' holes, allowing
0 5different portions2 5of the designs in the cells to show through.2 5Conse-
0 5quently, applying2 1clim:make-rectangular-tile5 to a pattern of
0 5nonuniform designs can produce2 5a different appearance in each tile.
0 5The pattern cells' holes are tiled,2 5but the designs in the cells are not
0 5tiled and a different portion of each2 5of those designs shows through
0 5in each tile.
0 5If 3array5 or 3designs5 is modified after calling 1clim:make-pattern5, the
0 5consequences are unspecified.
0 5In the present implementation, patterned designs are not supported
0 5as a2 5foreground or background, and the only patterned designs sup-
0 5ported as2 5the 1:ink5 drawing option are tilings of patterns of colors.2 5In
0 5Cloe there2 5is an additional restriction that the x-offset and y-offset
0 5of the tiling2 5must be 8.2
0,,
References:
Main Index |
Thread Index