Beispiel #1
0
        public void copy_vline(int x, int y, int len, ColorF sourceColor)
        {
            throw new NotImplementedException();
#if false
            int   scanWidth   = StrideInBytes();
            byte *pDestBuffer = GetPixelPointerXY(x, y);
            do
            {
                m_Blender.CopyPixel(pDestBuffer, sourceColor);
                pDestBuffer = &pDestBuffer[scanWidth];
            }while (--len != 0);
#endif
        }
Beispiel #2
0
        public static void BasedOnAlpha(IRecieveBlenderFloat Blender, float[] destBuffer, int bufferOffset, ColorF sourceColor)
        {
            //if (sourceColor.m_A != 0)
            {
#if false // we blend regardless of the alpha so that we can get Light Opacity working (used this way we have additive and faster blending in one blender) LBB
                if (sourceColor.m_A == base_mask)
                {
                    Blender.CopyPixel(pDestBuffer, sourceColor);
                }
                else
#endif
                {
                    Blender.BlendPixel(destBuffer, bufferOffset, sourceColor);
                }
            }
        }
Beispiel #3
0
        public static void BasedOnAlphaAndCover(IRecieveBlenderFloat Blender, float[] destBuffer, int bufferOffset, RGBA_Floats sourceColor, int cover)
        {
            if (cover == 255)
            {
                BasedOnAlpha(Blender, destBuffer, bufferOffset, sourceColor);
            }
            else
            {
                //if (sourceColor.m_A != 0)
                {
                    sourceColor.alpha = sourceColor.alpha * ((float)cover * (1 / 255));
#if false // we blend regardless of the alpha so that we can get Light Opacity working (used this way we have addative and faster blending in one blender) LBB
                    if (sourceColor.m_A == base_mask)
                    {
                        Blender.CopyPixel(pDestBuffer, sourceColor);
                    }
                    else
#endif
                    {
                        Blender.BlendPixel(destBuffer, bufferOffset, sourceColor);
                    }
                }
            }
        }
		public static void BasedOnAlphaAndCover(IRecieveBlenderFloat Blender, float[] destBuffer, int bufferOffset, RGBA_Floats sourceColor, int cover)
		{
			if (cover == 255)
			{
				BasedOnAlpha(Blender, destBuffer, bufferOffset, sourceColor);
			}
			else
			{
				//if (sourceColor.m_A != 0)
				{
					sourceColor.alpha = sourceColor.alpha * ((float)cover * (1 / 255));
#if false // we blend regardless of the alpha so that we can get Light Opacity working (used this way we have additive and faster blending in one blender) LBB
                    if (sourceColor.m_A == base_mask)
                    {
                        Blender.CopyPixel(pDestBuffer, sourceColor);
                    }
                    else
#endif
					{
						Blender.BlendPixel(destBuffer, bufferOffset, sourceColor);
					}
				}
			}
		}