Function mupdf_sys::fz_new_colorspace[][src]

pub unsafe extern "C" fn fz_new_colorspace(
    ctx: *mut fz_context,
    type_: fz_colorspace_type,
    flags: c_int,
    n: c_int,
    name: *const c_char
) -> *mut fz_colorspace

Creates a new colorspace instance and returns a reference.

No internal checking is done that the colorspace type (e.g. CMYK) matches with the flags (e.g. FZ_COLORSPACE_HAS_CMYK) or colorant count (n) or name.

The reference should be dropped when it is finished with.

Colorspaces are immutable once created (with the exception of setting up colorant names for separation spaces).