Defined in Style.Def Inherits from Style
Every viewable object can be drawn with a shadow around it. The shadow hangs down and to the right of the object, as if it were created by a light source over the user's left shoulder. Viewables that don't display a shadow around them have the nil object as their shadow.
When the user drags an object on the screen, the system adds a shadow to the object until the user releases it. The dragging shadow acts as a visual cue to demonstrate that the object has been temporarily "pulled off" the screen and grabbed for dragging.
Remember that if the documentation and the software (especially the definition files) disagree, always trust the software.
Shadow is a subclass of the Style class, which also provides the basis for a number of other viewable adornment classes. You can add shadows to your objects by dropping shadow coupons in them. Shadow coupons are available in the Magic Hat.
Shadows can be placed at any pixel offset from the object. The greater the shadow's offset, the farther away the imaginary light source that's casting the shadow.
Every shadow object includes a color that's used to draw the shadow.
Instantiate: rarely Subclass: rarely Call its methods: rarely
You'll rarely use an object of class Shadow directly. If you want to add a shadow to a viewable object, you can get a shadow coupon from the Magic Hat and drop it into the viewable.
The Shadow class defines the following fields:
Field | Type | Description |
---|---|---|
Inherited from Style: | ||
color | Object | Color used to draw associated object |
Defined by Shadow: | ||
shadowOffset | Micron | Offset in microns for shadow |
You'll rarely have to call or override any methods of class Shadow. Because there are so few methods defined by Shadow, this section describes all of them.
attribute ShadowOffset: Micron, safe, common // operation ShadowOffset: Micron, safe, common, noFail Call: rarely Override: rarely
Call ShadowOffset to return the value of the shadow object's offset in microns.
attribute ShadowOffset: Micron, safe, common // operation SetShadowOffset(newOffset: Micron) Call: rarely Override: rarely
Call SetShadowOffset to specify the value of the shadow object's offset in microns.
overrides MatchesInstance Call: rarely Override: rarely
The system calls MatchesInstance from the Matches method as a final test to see whether the given objects (self and other) have equal data. Matches returns true if the object and other are the same object ID or pointer, or if MatchesInstance (self, other) is true. Shadow_MatchesInstance returns true if the objects have the same shadow offset value and InheritedMatchesInstance(self, other) is true.
See Object_MatchesInstance and Object_Matches for more information.