public NSGradient(NSColor[] colors, float[] locations, NSColorSpace colorSpace) { unsafe { #if ARCH_32 fixed (void * locationPtr = locations) { Initialize (colors, locationPtr, colorSpace); } #else double[] converted = Array.ConvertAll<float, double> (locations, new Converter<float, double> (a => (double)a)); fixed (void * locationPtr = converted) { Initialize (colors, locationPtr, colorSpace); } #endif } }
public NSGradient(NSColor[] colors, double[] locations, NSColorSpace colorSpace) : base(NSObjectFlag.Empty) { unsafe { #if ARCH_64 fixed (void * locationPtr = locations) { Initialize (colors, locationPtr, colorSpace); } #else float[] converted = Array.ConvertAll<double, float> (locations, new Converter<double, float> (a => (float)a)); fixed (void * locationPtr = converted) { Initialize (colors, locationPtr, colorSpace); } #endif } }
public NSAttributedString(string str, NSFont font = null, NSColor foregroundColor = null, NSColor backgroundColor = null, NSColor strokeColor = null, NSColor underlineColor = null, NSColor strikethroughColor = null, NSUnderlineStyle underlineStyle = NSUnderlineStyle.None, NSUnderlineStyle strikethroughStyle = NSUnderlineStyle.None, NSParagraphStyle paragraphStyle = null, float strokeWidth = 0, NSShadow shadow = null, NSUrl link = null, bool superscript = false, NSTextAttachment attachment = null, NSLigatureType ligature = NSLigatureType.Default, float baselineOffset = 0, float kerningAdjustment = 0, float obliqueness = 0, float expansion = 0, NSCursor cursor = null, string toolTip = null, int characterShape = 0, NSGlyphInfo glyphInfo = null, NSArray writingDirection = null, bool markedClauseSegment = false, NSTextLayoutOrientation verticalGlyphForm = NSTextLayoutOrientation.Horizontal, NSTextAlternatives textAlternatives = null, NSSpellingState spellingState = NSSpellingState.None) : this(str, NSStringAttributes.ToDictionary ( font: font, foregroundColor: foregroundColor, backgroundColor: backgroundColor, strokeColor: strokeColor, underlineColor: underlineColor, strikethroughColor: strikethroughColor, underlineStyle: underlineStyle, strikethroughStyle: strikethroughStyle, paragraphStyle: paragraphStyle, strokeWidth: strokeWidth, shadow: shadow, link: link, superscript: superscript, attachment: attachment, ligature: ligature, baselineOffset: baselineOffset, kerningAdjustment: kerningAdjustment, obliqueness: obliqueness, expansion: expansion, cursor: cursor, toolTip: toolTip, characterShape: characterShape, glyphInfo: glyphInfo, writingDirection: writingDirection, markedClauseSegment: markedClauseSegment, verticalGlyphForm: verticalGlyphForm, textAlternatives: textAlternatives, spellingState: spellingState )) { }
unsafe void Initialize(NSColor[] colors, void * locationPtr, NSColorSpace colorSpace) { if (colors == null) throw new ArgumentNullException ("colors"); if (locationPtr == null) throw new ArgumentNullException ("locationPtr"); if (colorSpace == null) throw new ArgumentNullException ("colorSpace"); var nsa_colorArray = NSArray.FromNSObjects (colors); IntPtr locations = new IntPtr (locationPtr); if (IsDirectBinding) { Handle = XamCore.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr_IntPtr (this.Handle, selInitWithColorsAtLocationsColorSpace, nsa_colorArray.Handle, locations, colorSpace.Handle); } else { Handle = XamCore.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr_IntPtr_IntPtr (this.SuperHandle, selInitWithColorsAtLocationsColorSpace, nsa_colorArray.Handle, locations, colorSpace.Handle); } nsa_colorArray.Dispose (); }
public NSGradient(NSColor[] colors, double[] locations) : this(colors, locations, NSColorSpace.GenericRGBColorSpace) { }
public void DrawInsertionPointInRectcolorturnedOn(CGRect rect, NSColor color, bool turnedOn) { DrawInsertionPoint (rect, color, turnedOn); }