///<summary> ///</summary> ///<param name="blender"></param> ///<param name="p"></param> ///<param name="cr"></param> ///<param name="cg"></param> ///<param name="cb"></param> ///<param name="alpha"></param> ///<param name="cover"></param> public unsafe static void CopyOrBlendPixel(IBlender blender, byte *p, uint cr, uint cg, uint cb, uint alpha, uint cover) { if (blender == null) { throw new ArgumentNullException("Blender"); } if (cover == 255) { CopyOrBlendPixel(blender, p, cr, cg, cb, alpha); } else { if (alpha != 0) { alpha = (alpha * (cover + 1)) >> 8; if (alpha == BaseMask) { p[(int)Order.R] = (byte)cr; p[(int)Order.G] = (byte)cg; p[(int)Order.B] = (byte)cb; } else { blender.BlendPixel(p, cr, cg, cb, alpha, cover); } } } }
private float PCT(ECameraBlendType blendType, float alpha, IBlender blender) { float pct = 0.0f; if (blendType == ECameraBlendType.EBlendType_1) { pct = 1.0f; blendTimeLeftVT = 0.0f; } if (blendType == ECameraBlendType.EBlendType_2) { pct = MathLib.Lerp(0.0f, 1.0f, alpha); } if (blendType == ECameraBlendType.EBlendType_3) { pct = blender.Blend2(0.0f, 1.0f, alpha, pendingViewTarget.blendParameters.blendExponent); } if (blendType == ECameraBlendType.EBlendType_4) { pct = blender.Blend3(0.0f, 1.0f, alpha, pendingViewTarget.blendParameters.blendExponent); } if (blendType == ECameraBlendType.EBlendType_5) { pct = blender.Blend23(0.0f, 1.0f, alpha, pendingViewTarget.blendParameters.blendExponent); } return(pct); }
public ImageBuffer(IImage image, IBlender blender, GammaLookUpTable gammaTable) { unsafe { AttachBuffer(image.GetBuffer(), image.Width(), image.Height(), image.StrideInBytes(), image.BitDepth, image.GetDistanceBetweenPixelsInclusive()); } SetBlender(blender); }
///<summary> ///</summary> ///<param name="blender"></param> ///<param name="p"></param> ///<param name="cr"></param> ///<param name="cg"></param> ///<param name="cb"></param> ///<param name="alpha"></param> public unsafe static void CopyOrBlendPixel(IBlender blender, byte *p, uint cr, uint cg, uint cb, uint alpha) { if (blender == null) { throw new ArgumentNullException("blender"); } if (alpha == 0) { return; } if (alpha == BaseMask) { p[(int)Order.R] = (byte)cr; p[(int)Order.G] = (byte)cg; p[(int)Order.B] = (byte)cb; } else { blender.BlendPixel(p, cr, cg, cb, alpha); } }
public FormatRGBA(RasterBuffer rb, IBlender blender) { m_rbuf = rb; Blender = blender; }
//-------------------------------------------------------------------- public FormatRGBA(RasterBuffer rb, IBlender blender, GammaLookupTable gammaTable) : this(rb, blender) { throw new System.NotImplementedException("Not using the Gamma table yet."); }
//-------------------------------------------------------------------- public unsafe static void CopyOrBlendPixel(IBlender Blender, byte* p, uint cr, uint cg, uint cb, uint alpha, uint cover) { if (cover == 255) { CopyOrBlendPixel(Blender, p, cr, cg, cb, alpha); } else { if (alpha != 0) { alpha = (alpha * (cover + 1)) >> 8; if (alpha == base_mask) { p[(int)Order.R] = (byte)cr; p[(int)Order.G] = (byte)cg; p[(int)Order.B] = (byte)cb; p[(int)Order.A] = (byte)base_mask; } else { Blender.BlendPixel(p, cr, cg, cb, alpha, cover); } } } }
//-------------------------------------------------------------------- public unsafe static void CopyOrBlendPixel(IBlender Blender, byte* p, uint cr, uint cg, uint cb, uint alpha) { if (alpha != 0) { if (alpha == base_mask) { p[(int)Order.R] = (byte)cr; p[(int)Order.G] = (byte)cg; p[(int)Order.B] = (byte)cb; p[(int)Order.A] = (byte)base_mask; } else { Blender.BlendPixel(p, cr, cg, cb, alpha); } } }
public ImageBuffer(IImage image, IBlender blender, GammaLookUpTable gammaTable) { unsafe { AttachBuffer(image.GetBuffer(), image.Width(), image.Height(), image.StrideInBytes(), image.BitDepth, image.GetDistanceBetweenPixelsInclusive()); } SetRecieveBlender(blender); }
public FormatRGB(RasterBuffer rb, IBlender blender, GammaLut gammaTable) { m_rbuf = rb; Blender = blender; }
public BiologyFactory(IBlender blender, IBetterRandom betterRandom) { _blender = blender; _betterRandom = betterRandom; }
///<summary> ///</summary> ///<param name="rb"></param> ///<param name="blender"></param> public FormatRGB(RasterBuffer rb, IBlender blender) { _rasterBuffer = rb; Blender = blender; }
///<summary> ///</summary> ///<param name="blender"></param> ///<param name="p"></param> ///<param name="cr"></param> ///<param name="cg"></param> ///<param name="cb"></param> ///<param name="alpha"></param> ///<param name="cover"></param> public static unsafe void CopyOrBlendPixel(IBlender blender, byte* p, uint cr, uint cg, uint cb, uint alpha, uint cover) { if (blender == null) throw new ArgumentNullException("Blender"); if (cover == 255) { CopyOrBlendPixel(blender, p, cr, cg, cb, alpha); } else { if (alpha != 0) { alpha = (alpha * (cover + 1)) >> 8; if (alpha == BaseMask) { p[(int)Order.R] = (byte)cr; p[(int)Order.G] = (byte)cg; p[(int)Order.B] = (byte)cb; } else { blender.BlendPixel(p, cr, cg, cb, alpha, cover); } } } }
///<summary> ///</summary> ///<param name="blender"></param> ///<param name="p"></param> ///<param name="cr"></param> ///<param name="cg"></param> ///<param name="cb"></param> ///<param name="alpha"></param> public static unsafe void CopyOrBlendPixel(IBlender blender, byte* p, uint cr, uint cg, uint cb, uint alpha) { if (blender == null) throw new ArgumentNullException("blender"); if (alpha == 0) return; if (alpha == BaseMask) { p[(int)Order.R] = (byte)cr; p[(int)Order.G] = (byte)cg; p[(int)Order.B] = (byte)cb; } else { blender.BlendPixel(p, cr, cg, cb, alpha); } }
///<summary> ///</summary> ///<param name="rb"></param> ///<param name="blender"></param> ///<param name="gammaTable"></param> public FormatRGB(RasterBuffer rb, IBlender blender, GammaLookupTable gammaTable) { _rasterBuffer = rb; Blender = blender; }
///<summary> ///</summary> ///<param name="rb"></param> ///<param name="blender"></param> public FormatRGB(RasterBuffer rb, IBlender blender) { _rasterBuffer = rb; Blender = blender; }
///<summary> ///</summary> ///<param name="rb"></param> ///<param name="blender"></param> ///<param name="gammaTable"></param> public FormatRGB(RasterBuffer rb, IBlender blender, GammaLookupTable gammaTable) { _rasterBuffer = rb; Blender = blender; }
public void SetBlender(IBlender value) { m_LinkedImage.SetBlender(value); }