2 using System.Collections.Generic;
5 using DirectOutput.Cab.Color;
7 namespace DirectOutput.Cab.Toys.Layer
40 base[LayerNr] = value;
56 foreach (KeyValuePair<int, RGBALayer> KV
in this)
58 int Alpha = KV.Value.Alpha;
61 int NegAlpha = 255 - Alpha;
62 Red = AlphaMappingTable.AlphaMapping[NegAlpha, (int)Red] + AlphaMappingTable.AlphaMapping[Alpha, KV.Value.Red];
63 Green = AlphaMappingTable.AlphaMapping[NegAlpha, (
int)Green] + AlphaMappingTable.AlphaMapping[Alpha, KV.Value.Green];
64 Blue = AlphaMappingTable.AlphaMapping[NegAlpha, (int)Blue] + AlphaMappingTable.AlphaMapping[Alpha, KV.Value.Blue];
68 return new RGBColor((
int)Red, (
int)Green, (
int)Blue);