(… or create RTF with shadow style)
I’m using a modified example from other posts / plyosoft.com
... set plainTx to zAttrStrg's |string|() set theLength to zAttrStrg's |length|() set startIndex to 0 try repeat until (startIndex = theLength) set {zAttr, theRange} to zAttrStrg's attributesAtIndex:startIndex longestEffectiveRange:(reference) inRange:{startIndex, theLength - startIndex} set aText to (plainTx's substringWithRange:theRange) as string try set aShadow to (zAttr's valueForKeyPath:"NSShadow") if aShadow is not equal to missing value then log aShadow exit repeat end if end try set startIndex to current application's NSMaxRange(theRange) end repeat end try
I do find a shadow like i.e.
(NSShadow {5.0999999999999996, -5.1500000000000004} blur = 5.05 color = {NSCalibratedRGBColorSpace 0 0 0 0.333333})
But I can’t find a way to retrieve the settings: offset (size), blur and color.
Found something in 10.3 notes:
An NSShadow may currently be used in one of two ways. First, it may be set, like a color or a font, in which case it is applied to all drawing until another shadow is applied or until the next graphics state restore. It may also be used as the value for the new NSShadowAttributeName text attribute, in which case it will be applied to the glyphs corresponding to the characters bearing this attribute. See the section on additional text attributes for the definition of NSShadowAttributeName.
But still no idea how to use that - even makes it more confusing.
As always, any help, hints, etc. are greatly appreciated.