Package cli.System.Runtime.InteropServices

Examples of cli.System.Runtime.InteropServices.GCHandle


    }

    // create a private Font Collection and add the font data
    @cli.System.Security.SecuritySafeCriticalAttribute.Annotation
    private static PrivateFontCollection createPrivateFontCollection(byte[] fontData) throws cli.System.IO.FileNotFoundException {
        GCHandle handle = GCHandle.Alloc(fontData, GCHandleType.wrap(GCHandleType.Pinned));
        try {
            PrivateFontCollection pfc = new PrivateFontCollection();
            // AddMemoryFont throws a cli.System.IO.FileNotFoundException if the data are corrupt
            pfc.AddMemoryFont( handle.AddrOfPinnedObject(), fontData.length );
            return pfc;
        } finally {
            handle.Free();
        }
    }
View Full Code Here

TOP

Related Classes of cli.System.Runtime.InteropServices.GCHandle

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.