Esempio n. 1
0
		public unsafe void ShowCGGlyphs (
			short[] /* const CGGlyph* = CGFontIndex* = unsigned short* */ glyphs,
			CGPoint[] /* const CGPoint* */ positions,
			nuint /* NSUInteger */ glyphCount,
			UIFont font,
			CGAffineTransform textMatrix,
			NSDictionary attributes,
			CGContext graphicsContext)
		{
			fixed (short* gl = glyphs) {
				fixed (CGPoint* pos = positions) {
					ShowCGGlyphsInternal ((IntPtr) gl, (IntPtr) pos, glyphCount, font, textMatrix, attributes, graphicsContext);
				}
			}
		}
Esempio n. 2
0
        internal UITextAttributes(NSDictionary dict)
        {
            if (dict == null)
                return;

            NSObject val;

            if (dict.TryGetValue (UITextAttributesConstants.Font, out val))
                Font = val as UIFont;
            if (dict.TryGetValue (UITextAttributesConstants.TextColor, out val))
                TextColor = val as UIColor;
            if (dict.TryGetValue (UITextAttributesConstants.TextShadowColor, out val))
                TextShadowColor = val as UIColor;
            if (dict.TryGetValue (UITextAttributesConstants.TextShadowOffset, out val)) {
                var value = val as NSValue;
                if (value != null)
                    TextShadowOffset = value.UIOffsetValue;
            }
        }
Esempio n. 3
0
 public static CGSize DrawString(this string This, CGPoint point, global::System.nfloat width, UIFont font, UILineBreakMode breakMode)
 {
     using (var self = ((NSString)This))
         return(self.DrawString(point, width, font, breakMode));
 }
Esempio n. 4
0
 public static CGSize StringSize(this string This, UIFont font, CGSize constrainedToSize, UILineBreakMode lineBreakMode)
 {
     using (var self = ((NSString)This))
         return(self.StringSize(font, constrainedToSize, lineBreakMode));
 }
Esempio n. 5
0
 public static CGSize StringSize(this string This, UIFont font, global::System.nfloat minFontSize, ref global::System.nfloat actualFontSize, global::System.nfloat forWidth, UILineBreakMode lineBreakMode)
 {
     using (var self = ((NSString)This))
         return(self.StringSize(font, minFontSize, ref actualFontSize, forWidth, lineBreakMode));
 }
Esempio n. 6
0
 public static CGSize StringSize(this string This, UIFont font)
 {
     using (var self = ((NSString)This))
         return(self.StringSize(font));
 }
Esempio n. 7
0
 public static CGSize StringSize(this string This, UIFont font, global::System.nfloat forWidth, UILineBreakMode breakMode)
 {
     using (var self = ((NSString)This))
         return(self.StringSize(font, forWidth, breakMode));
 }
Esempio n. 8
0
 public static CGSize DrawString(this string This, CGRect rect, UIFont font)
 {
     using (var self = ((NSString)This))
         return(self.DrawString(rect, font));
 }
Esempio n. 9
0
 public static CGSize DrawString(this string This, CGRect rect, UIFont font, UILineBreakMode mode, UITextAlignment alignment)
 {
     using (var self = ((NSString)This))
         return(self.DrawString(rect, font, mode, alignment));
 }
Esempio n. 10
0
 public NSAttributedString(string str,
     UIFont font = null,
     UIColor foregroundColor = null,
     UIColor backgroundColor = null,
     UIColor strokeColor = null,
     NSParagraphStyle paragraphStyle = null,
     NSLigatureType ligatures = NSLigatureType.Default,
     float kerning = 0,
     NSUnderlineStyle underlineStyle = NSUnderlineStyle.None,
     NSShadow shadow = null,
     float strokeWidth = 0,
     NSUnderlineStyle strikethroughStyle = NSUnderlineStyle.None)
     : this(str, ToDictionary (font, foregroundColor, backgroundColor, strokeColor, paragraphStyle, ligatures, kerning, underlineStyle, shadow, strokeWidth, strikethroughStyle))
 {
 }
Esempio n. 11
0
 public static CGSize DrawString(this string This, CGPoint point, global::System.nfloat width, UIFont font, UILineBreakMode breakMode)
 {
     using (var self = ((NSString) This))
         return self.DrawString (point, width, font, breakMode);
 }
Esempio n. 12
0
 public static CGSize StringSize(this string This, UIFont font, CGSize constrainedToSize, UILineBreakMode lineBreakMode)
 {
     using (var self = ((NSString) This))
         return self.StringSize (font, constrainedToSize, lineBreakMode);
 }
Esempio n. 13
0
 public static CGSize StringSize(this string This, UIFont font, global::System.nfloat minFontSize, ref global::System.nfloat actualFontSize, global::System.nfloat forWidth, UILineBreakMode lineBreakMode)
 {
     using (var self = ((NSString) This))
         return self.StringSize (font, minFontSize, ref actualFontSize, forWidth, lineBreakMode);
 }
Esempio n. 14
0
 public static CGSize StringSize(this string This, UIFont font, global::System.nfloat forWidth, UILineBreakMode breakMode)
 {
     using (var self = ((NSString) This))
         return self.StringSize (font, forWidth, breakMode);
 }
Esempio n. 15
0
 public static CGSize StringSize(this string This, UIFont font)
 {
     using (var self = ((NSString) This))
         return self.StringSize (font);
 }
Esempio n. 16
0
 public static CGSize DrawString(this string This, CGRect rect, UIFont font, UILineBreakMode mode, UITextAlignment alignment)
 {
     using (var self = ((NSString) This))
         return self.DrawString (rect, font, mode, alignment);
 }
Esempio n. 17
0
 public static CGSize DrawString(this string This, CGRect rect, UIFont font)
 {
     using (var self = ((NSString) This))
         return self.DrawString (rect, font);
 }
Esempio n. 18
0
 public static CGSize DrawString(this string This, CGPoint point, global::System.nfloat width, UIFont font, global::System.nfloat minFontSize, ref global::System.nfloat actualFontSize, UILineBreakMode breakMode, UIBaselineAdjustment adjustment)
 {
     using (var self = ((NSString) This))
         return self.DrawString (point, width, font, minFontSize, ref actualFontSize, breakMode, adjustment);
 }
Esempio n. 19
0
 internal static NSDictionary ToDictionary(
     UIFont font,
     UIColor foregroundColor,
     UIColor backgroundColor,
     UIColor strokeColor,
     NSParagraphStyle paragraphStyle,
     NSLigatureType ligature,
     float kerning,
     NSUnderlineStyle underlineStyle,
     NSShadow shadow,
     float strokeWidth,
     NSUnderlineStyle strikethroughStyle)
 {
     var attr = new UIStringAttributes ();
     if (font != null){
         attr.Font = font;
     }
     if (foregroundColor != null){
         attr.ForegroundColor = foregroundColor;
     }
     if (backgroundColor != null){
         attr.BackgroundColor = backgroundColor;
     }
     if (strokeColor != null){
         attr.StrokeColor = strokeColor;
     }
     if (paragraphStyle != null){
         attr.ParagraphStyle = paragraphStyle;
     }
     if (ligature != NSLigatureType.Default){
         attr.Ligature = ligature;
     }
     if (kerning != 0){
         attr.KerningAdjustment = kerning;
     }
     if (underlineStyle != NSUnderlineStyle.None){
         attr.UnderlineStyle = underlineStyle;
     }
     if (shadow != null){
         attr.Shadow = shadow;
     }
     if (strokeWidth != 0){
         attr.StrokeWidth = strokeWidth;
     }
     if (strikethroughStyle != NSUnderlineStyle.None){
         attr.StrikethroughStyle = strikethroughStyle;
     }
     var dict = attr.Dictionary;
     return dict.Count == 0 ? null : dict;
 }
Esempio n. 20
0
 public static CGSize DrawString(this string This, CGPoint point, global::System.nfloat width, UIFont font, global::System.nfloat minFontSize, ref global::System.nfloat actualFontSize, UILineBreakMode breakMode, UIBaselineAdjustment adjustment)
 {
     using (var self = ((NSString)This))
         return(self.DrawString(point, width, font, minFontSize, ref actualFontSize, breakMode, adjustment));
 }