MBS Xojo Developer Conference and Training
Join us from 3rd to 6th May 2017 in Berlin, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

NSShadowMBS class

class, Cocoa, MBS CocoaBase Plugin (NSAttributedString), class NSShadowMBS,
Plugin version: 16.1, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

Function: An NSShadow object encapsulates the attributes used to create a drop shadow during drawing operations.
Shadows are always drawn in the default user coordinate space, regardless of any transformations applied to that space. This means that rotations, translations and other transformations of the current transformation matrix (the CTM) do not affect the resulting shadow. Another way to think about this is that changes to the CTM do not move or change the apparent position of the shadow’s light source.

There are two positional parameters for a shadow: an x-offset and a y-offset. These values are expressed using a single size data type (CGSize on iOS, NSSize on OS X) and using the units of the default user coordinate space. Positive values for these offsets extend up and to the right.

In addition to its positional parameters, a shadow also contains a blur radius, which specifies how much a drawn object's image mask is blurred before it is composited onto the destination. A value of 0 means there is no blur. Larger values give correspondingly larger amounts of blurring.

An NSShadow object may be used in one of two ways. First, it may be set, like a color or a font, in which case its attributes are applied to all content drawn thereafter—or at least until another shadow is applied or a previous graphics state is restored. Second, it may be used as the value for the NSShadowAttributeName text attribute, in which case it is applied to the glyphs corresponding to the characters bearing this attribute.

This class has no sub classes.

Some examples which use this class:

The items on this page are in the following plugins: MBS CocoaBase Plugin.

NSServiceProviderMBS   -   NSSharingServiceDelegateMBS

MBS Xojo Plugins