コード例 #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);
				}
			}
		}
コード例 #2
0
        public void Draw(CGContext ctx)
        {
            if (ctx == null)
                throw new ArgumentNullException ("ctx");

            CTFrameDraw (handle, ctx.Handle);
        }
コード例 #3
0
		static void DrawCallback (IntPtr voidptr, IntPtr cgcontextptr)
		{
			GCHandle gch = GCHandle.FromIntPtr (voidptr);
			DrawPattern draw_pattern = (DrawPattern) gch.Target;
			using (var ctx = new CGContext (cgcontextptr))
				draw_pattern (ctx);
		}
コード例 #4
0
 public static void PushContext(CGContext ctx)
 {
     UIGraphicsPushContext (ctx.Handle);
 }
コード例 #5
0
 public static NSGraphicsContext FromGraphicsPort(CGContext context, bool initialFlippedState)
 {
     if (context == null)
         throw new ArgumentNullException ("context");
     return FromGraphicsPort (context.Handle, initialFlippedState);
 }
コード例 #6
0
		public static CGLayer Create (CGContext context, CGSize size)
		{
			// note: auxiliaryInfo is reserved and should be null
			return new CGLayer (CGLayerCreateWithContext (context == null ? IntPtr.Zero : context.Handle, size, IntPtr.Zero), true);
		}
コード例 #7
0
 public static CIContext FromContext(CGContext ctx)
 {
     return FromContext (ctx, (CIContextOptions) null);
 }
コード例 #8
0
 public static CIContext FromContext(CGContext ctx, CIContextOptions options)
 {
     return FromContext (ctx, options?.Dictionary);
 }
コード例 #9
0
        public static CIContext FromContext(CGContext ctx, CIContextOptions options)
        {
            NSDictionary dict = options == null ? null : options.Dictionary;

            return FromContext (ctx, dict);
        }
コード例 #10
0
 public CGRect GetImageBounds(CGContext context)
 {
     return CTLineGetImageBounds (handle, context.GetHandle ());
 }
コード例 #11
0
 public void Draw(CGContext context)
 {
     if (context == null)
         throw new ArgumentNullException ("context");
     CTLineDraw (handle, context.Handle);
 }