Class ColorManagement
Namespace: Aurigma.DesignAtoms.ColorManagement
Assembly: Aurigma.DesignAtoms.dll
Syntax
public class ColorManagement : IColorManagement, IDisposable
Inheritance: System.Object -> ColorManagement
Implements
- Aurigma.DesignAtoms.ColorManagement.IColorManagement
System.IDisposable
Inherited Members
System.Object.ToStringSystem.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.ReferenceEquals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.MemberwiseClone
Constructors
ColorManagement
public ColorManagement(IConfiguration configuration, IColorProfileManager colorProfileManager)
Properties
Srgb
public ColorProfile Srgb { get; }
DefaultRgbProfile
public ColorProfile DefaultRgbProfile { get; }
DefaultCmykProfile
public ColorProfile DefaultCmykProfile { get; }
DefaultGrayscaleProfile
public ColorProfile DefaultGrayscaleProfile { get; }
DefaultSourceColorProfiles
public ISourceColorProfiles DefaultSourceColorProfiles { get; }
ColorProfileManager
public IColorProfileManager ColorProfileManager { get; }
DefaultPreviewColorSettings
public IRenderingColorSettings DefaultPreviewColorSettings { get; }
Methods
CompareProfiles
public bool CompareProfiles(ColorProfile cp1, ColorProfile cp2)
Parameters
| Type | Name | Description |
|---|---|---|
Aurigma.GraphicsMill.ColorProfile | cp1 | |
Aurigma.GraphicsMill.ColorProfile | cp2 |
Returns
System.Boolean
GetPixelFormat
public PixelFormat GetPixelFormat(ColorSpace colorSpace, bool withAlpha = true)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Color.ColorSpace | colorSpace | |
System.Boolean | withAlpha |
Returns
Aurigma.DesignAtoms.Model.Color.PixelFormat
GetDefaultProfile
public ColorProfile GetDefaultProfile(ColorSpace colorSpace)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Color.ColorSpace | colorSpace |
Returns
Aurigma.GraphicsMill.ColorProfile
GetProfile
public ColorProfile GetProfile(Color color, ISourceColorProfiles sourceColorProfiles = null)
Parameters
| Type | Name | Description |
|---|---|---|
Aurigma.GraphicsMill.Color | color | |
| Aurigma.DesignAtoms.ColorManagement.ISourceColorProfiles | sourceColorProfiles |
Returns
Aurigma.GraphicsMill.ColorProfile
GetProfileOrDefault
public ColorProfile GetProfileOrDefault(ColorSpace colorSpace, ISourceColorProfiles sourceColorProfiles = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Color.ColorSpace | colorSpace | |
| Aurigma.DesignAtoms.ColorManagement.ISourceColorProfiles | sourceColorProfiles |
Returns
Aurigma.GraphicsMill.ColorProfile
GetColorConverter
public IColorConverter GetColorConverter(PixelFormat sourcePixelFormat, ColorProfile sourceColorProfile, IRenderingColorSettings colorSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Color.PixelFormat | sourcePixelFormat | |
Aurigma.GraphicsMill.ColorProfile | sourceColorProfile | |
| Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings | colorSettings |
Returns
Aurigma.DesignAtoms.ColorManagement.IColorConverter
GetColorConverter
public IColorConverter GetColorConverter(PixelFormat sourcePixelFormat, ColorProfile sourceColorProfile, IRenderingColorSettings colorSettings, PixelFormat? destinationPixelFormat, ColorProfile destinationColorProfile = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Color.PixelFormat | sourcePixelFormat | |
Aurigma.GraphicsMill.ColorProfile | sourceColorProfile | |
| Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings | colorSettings | |
System.Nullable<Aurigma.DesignAtoms.Model.Color.PixelFormat> | destinationPixelFormat | |
Aurigma.GraphicsMill.ColorProfile | destinationColorProfile |
Returns
Aurigma.DesignAtoms.ColorManagement.IColorConverter
GetBlackAndWhiteColorConverter
public IColorConverter GetBlackAndWhiteColorConverter(PixelFormat sourcePixelFormat, ISourceColorProfiles sourceColorProfiles = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Color.PixelFormat | sourcePixelFormat | |
| Aurigma.DesignAtoms.ColorManagement.ISourceColorProfiles | sourceColorProfiles |
Returns
Aurigma.DesignAtoms.ColorManagement.IColorConverter
ConvertColor
public Color ConvertColor(Color color, IRenderingColorSettings colorSettings, PixelFormat? destinationPixelFormat, bool renderOnPdf = false)
Parameters
| Type | Name | Description |
|---|---|---|
Aurigma.GraphicsMill.Color | color | |
| Aurigma.DesignAtoms.ColorManagement.IRenderingColorSettings | colorSettings | |
System.Nullable<Aurigma.DesignAtoms.Model.Color.PixelFormat> | destinationPixelFormat | |
System.Boolean | renderOnPdf |
Returns
Aurigma.GraphicsMill.Color
SaveColorProfileAsync
public Task SaveColorProfileAsync(ColorProfile colorProfile)
Parameters
| Type | Name | Description |
|---|---|---|
Aurigma.GraphicsMill.ColorProfile | colorProfile |
Returns
System.Threading.Tasks.Task
LoadColorProfileAsync
public Task<ColorProfile> LoadColorProfileAsync(string description)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | description |
Returns
System.Threading.Tasks.Task<Aurigma.GraphicsMill.ColorProfile>
LoadColorProfileOrDefaultAsync
public Task<ColorProfile> LoadColorProfileOrDefaultAsync(string description, ColorSpace colorSpace)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | description | |
| Aurigma.DesignAtoms.Model.Color.ColorSpace | colorSpace |
Returns
System.Threading.Tasks.Task<Aurigma.GraphicsMill.ColorProfile>
ContainsColorProfileAsync
public Task<bool> ContainsColorProfileAsync(string description)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | description |
Returns
System.Threading.Tasks.Task<System.Boolean>
GetTransparentColor
public Color GetTransparentColor(PixelFormat pixelFormat)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Color.PixelFormat | pixelFormat |
Returns
Aurigma.GraphicsMill.Color
GetTransparentColor
public Color GetTransparentColor(ColorSpace colorSpace)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Color.ColorSpace | colorSpace |
Returns
Aurigma.GraphicsMill.Color
GetBlackColor
public Color GetBlackColor(ColorSpace colorSpace)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Color.ColorSpace | colorSpace |
Returns
Aurigma.GraphicsMill.Color
GetWhiteColor
public Color GetWhiteColor(ColorSpace colorSpace)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Color.ColorSpace | colorSpace |
Returns
Aurigma.GraphicsMill.Color
GetAlpha
public byte GetAlpha(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
Aurigma.GraphicsMill.Color | color |
Returns
System.Byte
Dispose
public void Dispose()