/// <summary> /// Gets the ARGB color that is mapped to from the given RGB color. /// </summary> /// <param name="source">The source RGB color.</param> /// <param name="destination">When this method returns, contains resulting ARGB color, if a mapping exists; otherwise, the default /// ARGB color. This parameter is passed uninitialized.</param> /// <returns>Returns true if a mapping was found; otherwise, false.</returns> public bool TryGetMapping(RgbColor source, out ArgbColor destination) { return(map.TryGetValue(source, out destination)); }
/// <summary> /// Initializes a new instance of the <see cref="T:DesktopSprites.SpriteManagement.ArgbColor"/> structure from the specified /// alpha, and with the same red, green and blue values as the given <see cref="T:DesktopSprites.SpriteManagement.RgbColor"/>. /// </summary> /// <param name="a">The alpha component value for the new <see cref="T:DesktopSprites.SpriteManagement.ArgbColor"/>.</param> /// <param name="color">An <see cref="T:DesktopSprites.SpriteManagement.RgbColor"/> which specifies the red, green and blue /// components for the new <see cref="T:DesktopSprites.SpriteManagement.ArgbColor"/>.</param> public ArgbColor(byte a, RgbColor color) : this(a, color.R, color.G, color.B) { }