Пример #1
0
 /// <summary>
 /// Creates a new instance of the <see cref="NamedColorList"/> class.
 /// </summary>
 /// <param name="context">A <see cref="Context"/>, or null for the global context.</param>
 /// <param name="n">The initial number of spot colors in the list.</param>
 /// <param name="colorantCount">The number of channels in the device space.</param>
 /// <param name="prefix">Prefix for all spot color names.</param>
 /// <param name="suffix">Suffix for all spot color names.</param>
 /// <returns>A new <see cref="NamedColorList"/> instance.</returns>
 /// <exception cref="LcmsNETException">
 /// Failed to create instance.
 /// </exception>
 /// <remarks>
 /// Creates the instance in the global context if <paramref name="context"/> is null.
 /// </remarks>
 public static NamedColorList Create(Context context, uint n, uint colorantCount, string prefix, string suffix)
 {
     return(new NamedColorList(
                Interop.AllocNamedColorList(context?.Handle ?? IntPtr.Zero,
                                            n, colorantCount, prefix ?? string.Empty, suffix ?? string.Empty), context));
 }