예제 #1
0
 static void OverrideDrawGlyph(GLib.GType gtype, DrawGlyphNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("draw_glyph"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
예제 #2
0
        private void InternalDrawGlyph(Pango.Font font, uint glyph, double x, double y)
        {
            DrawGlyphNativeDelegate unmanaged = class_abi.BaseOverride <DrawGlyphNativeDelegate>(this.LookupGType(), "draw_glyph");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, font == null ? IntPtr.Zero : font.Handle, glyph, x, y);
        }
예제 #3
0
        private void InternalDrawGlyph(Pango.Font font, uint glyph, double x, double y)
        {
            DrawGlyphNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("draw_glyph"));
                unmanaged = (DrawGlyphNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DrawGlyphNativeDelegate));
            }
            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, font == null ? IntPtr.Zero : font.Handle, glyph, x, y);
        }