Style Frame
Style frames, as used by theDrawShape
and other functions, may contain the following slots (new or changed slots are listed first):Slot descriptions
textPattern
- New slot. The shade of gray to render text in. This slot makes it possible to use the same style frame for an array containing both non-text shapes and text rendered with different tones. Possible values for this slot are the constants specified in "Gray Tone Constants", or the return value of *
PackRGB
.selection
- New slot. The size of the selection handles in pixels. If this slot is present selection handles are drawn in the four corners of the shape bounds. The value is the size of the handles; an even number is recommended as it centers the handles best over the corners. The *
FindShape
function supports hit testing of these handles.penPattern
- Changed slot. The pen pattern. Possible values for this slot are the constants specified in "Gray Tone Constants", the return value of *
PackRGB
, or a pattern, gray pattern, or dithered pattern.- The Newton 2.0 OS draws text in a dithered pattern if a gray pattern (such as
vfGRay
) is specified. The Newton 2.1 OS draws the text in the proper tone of gray whenkRGB_GrayXX
constants, or a gray or dithered pattern are used.fillPattern
- Changed slot. The Newton 2.0 fills OS areas in a dithered pattern if a gray pattern is specified. The 2.1 OS fills the area in the proper tone of gray when
kRGB_GrayXX
constants, or a gray or dithered pattern are used. Possible values for this slot are the constants specified in "Gray Tone Constants", the return value of*PackRGB
, or a pattern as defined in "Patterns".font
- Changed slot. The font to use for drawing text. The default is the font selected by the user in the Styles palette. In Newton 2.1 OS, this slot can also contain a
color
slot, which is ignored by earlier systems. The color slot can contain akRGB_GrayXX
constant, or a packed RGB integer as returned by *PackRGB
. See "Fonts for Text and Ink Display" (page 8-3) in Newton Programmer's Guide for details on specifying a font.
transferMode
- Changed slot. The way a drawing is merged with the existing background. Specify one of these constants listed in "Transfer Mode Constants". The default transfer mode is a split state: bitmap shapes and text are drawn with a
modeOr
transfer mode, but other items (geometric shapes, pens, and fill patterns) are drawn with amodeCopy
transfer mode.
penSize
- Exiting slot.The size of the pen in pixels. You can specify a single integer to indicate a square pen of the specified size, or you can specify an array giving the pen width and height (for example,
[1, 2]
). This value is not used for drawing text. The minimum and default pen size is 1. However, no frame will be drawn for a shape ifpenPattern
is set tovfNone
(the defaultpenPattern
isvfBlack
).
justification
- Exiting slot. The alignment of text in the rectangle specified for it. Specify one of the following symbols:
'left
,'right
,'center
. The default value is'left
.
clipping
- Exiting slot. Specifies a clipping region to which all drawing is clipped in addition to the default clipping. The value of this slot can be a primitive shape, a region, or an array of shapes (from which a new clipping region is constructed automatically by the system). For more information see "Controlling Clipping" (page 13-12) in the Newton Programmer's Guide.
transform
- Exiting slot. Used to offset or scale the shape. The value of this slot is an array that can hold a coordinate pair or a pair of source and destination rectangles. For more information, see "Transforming a Shape" (page 13-13) in the Newton Programmer's Guide.
![]()
![]()
![]()
![]()
© Apple Computer, Inc.
26 APR 1997Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help