/** * @since Available in iOS 3.2 and later. */ public CTAttributedStringAttributes setStrokeColor(CGColor strokeColor) { set(CTAttributedStringAttribute.StrokeColor, strokeColor); return this; } /**
@MarshalsPointer public static CTAttributedStringAttributes toObject(Class<CTAttributedStringAttributes> cls, long handle, long flags) { CFDictionary o = (CFDictionary) CFType.Marshaler.toObject(CFDictionary.class, handle, flags); if (o == null) { return null; } return new CTAttributedStringAttributes(o); } @MarshalsPointer
public void addAttributes(CTAttributedStringAttributes attrs, @ByVal NSRange range) { if (attrs == null) { throw new NullPointerException("attrs"); } addAttributes(attrs.getDictionary().as(NSDictionary.class), range); }
public <T extends NativeObject> T get(CTAttributedStringAttribute key, Class<T> type) { if (has(key)) { return data.get(key.value(), type); } return null; } public CTAttributedStringAttributes set(CTAttributedStringAttribute key, NativeObject value) {
@WeaklyLinked public CTAttributedStringAttributes getCoreTextAttributes(long loc, CFRange effectiveRange) { CFDictionary dict = getAttributesDictionary(loc, effectiveRange); if (dict == null) return null; return new CTAttributedStringAttributes(null); } /*<methods>*/
public NSAttributedString(String str, CTAttributedStringAttributes attrs) { super((SkipInit)null); if (attrs == null) { throw new NullPointerException("attrs"); } initObject(init(str, attrs.getDictionary().as(NSDictionary.class))); } /**
@MarshalsPointer public static List<CTAttributedStringAttributes> toObject(Class<? extends CFType> cls, long handle, long flags) { CFArray o = (CFArray) CFType.Marshaler.toObject(CFArray.class, handle, flags); if (o == null) { return null; } List<CTAttributedStringAttributes> list = new ArrayList<>(); for (int i = 0; i < o.size(); i++) { list.add(new CTAttributedStringAttributes(o.get(i, CFDictionary.class))); } return list; } @MarshalsPointer
@WeaklyLinked public static CFAttributedString create(CFAllocator alloc, String str, CTAttributedStringAttributes attributes) { if (attributes == null) { return create(alloc, str, (CFDictionary)null); } return create(alloc, str, attributes.getDictionary()); } @WeaklyLinked
/** * @since Available in iOS 3.2 and later. */ public CTAttributedStringAttributes setGlyphInfo(CTGlyphInfo glyphInfo) { set(CTAttributedStringAttribute.GlyphInfo, glyphInfo); return this; } /**
/** * @since Available in iOS 6.0 and later. */ @WeaklyLinked public CTAttributedStringAttributes getTypingCoreTextAttributes() { NSDictionary<NSString, ?> dict = getTypingAttributesDictionary(); if (dict == null) return null; return new CTAttributedStringAttributes(dict.as(CFDictionary.class)); } /**
/** * @since Available in iOS 7.0 and later. */ @WeaklyLinked public CGSize getSize(CTAttributedStringAttributes attrs) { if (attrs == null) { throw new NullPointerException("attrs"); } return NSStringExtensions.getSize(this.getHandle(), attrs.getDictionary().as(NSDictionary.class)); } /**
/** * @since Available in iOS 8.0 and later. */ public CTAttributedStringAttributes setRubyAnnotation(CTRubyAnnotation rubyAnnotation) { set(CTAttributedStringAttribute.RubyAnnotation, rubyAnnotation); return this; } /*</methods>*/
@WeaklyLinked public CTAttributedStringAttributes getCoreTextAttributesForNull() { NSDictionary dict = getTextAttributesDictionaryForNull(); if (dict == null) return null; return new CTAttributedStringAttributes(dict.as(CFDictionary.class)); } @WeaklyLinked
/** * @since Available in iOS 7.0 and later. */ @WeaklyLinked public static void draw(String str, CGRect rect, NSStringDrawingOptions options, CTAttributedStringAttributes attributes, NSStringDrawingContext context) { NSStringExtensions.draw(create(getChars(str), str.length()), rect, options, attributes.getDictionary().as(NSDictionary.class), context); }
/** * @since Available in iOS 3.2 and later. */ public CTAttributedStringAttributes setForegroundColor(CGColor foregroundColor) { set(CTAttributedStringAttribute.ForegroundColor, foregroundColor); return this; } /**