private Typeface(android.graphics.Typeface.NativeTypeface ni) { // don't allow clients to call this directly if (null == ni) { throw new java.lang.RuntimeException("native typeface cannot be made"); } native_instance = ni; }
/// <summary> /// Create a typeface object that best matches the specified existing /// typeface and the specified Style. /// </summary> /// <remarks> /// Create a typeface object that best matches the specified existing /// typeface and the specified Style. Use this call if you want to pick a new /// style from the same family of an existing typeface object. If family is /// null, this selects from the default font's family. /// </remarks> /// <param name="family">May be null. The name of the existing type face.</param> /// <param name="style"> /// The style (normal, bold, italic) of the typeface. /// e.g. NORMAL, BOLD, ITALIC, BOLD_ITALIC /// </param> /// <returns>The best matching typeface.</returns> public static android.graphics.Typeface create(android.graphics.Typeface family, int style) { android.graphics.Typeface.NativeTypeface ni = null; if (family != null) { ni = family.native_instance; } return(new android.graphics.Typeface(nativeCreateFromTypeface(ni, style))); }
private static int nativeGetStyle(android.graphics.Typeface.NativeTypeface native_instance ) { return(libxobotos_Typeface_style(native_instance)); }
private static extern int libxobotos_Typeface_style(android.graphics.Typeface.NativeTypeface native_instance);
private static void nativeUnref(android.graphics.Typeface.NativeTypeface native_instance ) { native_instance.Dispose(); }
private static android.graphics.Typeface.NativeTypeface nativeCreateFromTypeface( android.graphics.Typeface.NativeTypeface native_instance, int style) { return(libxobotos_Typeface_createFromTypeface(native_instance != null ? native_instance : android.graphics.Typeface.NativeTypeface.Zero, style)); }
private static extern android.graphics.Typeface.NativeTypeface libxobotos_Typeface_createFromTypeface (android.graphics.Typeface.NativeTypeface native_instance, int style);