• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IColorType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IColorType的典型用法代码示例。如果您正苦于以下问题:C# IColorType类的具体用法?C# IColorType怎么用?C# IColorType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IColorType类属于命名空间,在下文中一共展示了IColorType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: HistoryData

 internal HistoryData(int Capacity, IColorType Color)
 {
 	m_Color = Color.GetAsRGBA_Bytes();
     m_Capacity = Capacity;
     m_Data = new TwoSidedStack<double>();
     Reset();
 }
开发者ID:klewisjohnson,项目名称:MatterControl,代码行数:7,代码来源:DataViewGraph.cs


示例2: HistoryData

			internal HistoryData(int capacity, IColorType lineColor)
			{
				this.lineColor = lineColor.GetAsRGBA_Bytes();
				this.capacity = capacity;
				data = new List<double>();
				Reset();
			}
开发者ID:broettge,项目名称:MatterControl,代码行数:7,代码来源:DataViewGraph.cs


示例3: EvaluateShadow

 public override void EvaluateShadow(ShadePointInfo pt, float u0, float u1, float u2, out IColorType radiance, out float pdf, out RayData ray)
 {
     var wi = MC.CosineSampleHemisphere(u1, u2);
     pdf = wi.z * MathLab.INVPI;
     wi = pt.Frame.ToWorld(ref wi);
     ray = new RayData(ref pt.HitPoint, ref wi, 1e-4f, float.MaxValue);
     radiance = Le(ref wi);
 }
开发者ID:HungryBear,项目名称:rayden,代码行数:8,代码来源:BaseInfiniteLight.cs


示例4: F

        public override void F(ShadePointInfo pt, out IColorType fs, BrdfType types = BrdfType.Diffuse)
        {
            float c = 1f - Vector.Dot(ref pt.IncomingDirection, ref pt.ShadingNormal);
            float Re = R0 + (1f - R0) * c * c * c * c * c;

            float P = .25f + .5f * Re;

            fs = pt.Diffuse.CloneValue().Mul(MathLab.INVPI).Mul((1f - Re) / (1f - P));
        }
开发者ID:HungryBear,项目名称:rayden,代码行数:9,代码来源:AlloyBrdf.cs


示例5: EvaluateIllumination

        public override void EvaluateIllumination(RayEngineScene scn, float u0, float u1, float u2, float u3, float u4, out RayData ray, out float pdf, out IColorType radiance)
        {
            Vector dir = MC.UniformSampleSphere(u0, u1);

            ray = new RayData(ref Position, ref dir, 1e-4f, 1e4f);

            pdf = MathLab.INV4PI;

            radiance = (power.Mul(MathLab.M_PI * 4f));
        }
开发者ID:HungryBear,项目名称:rayden,代码行数:10,代码来源:PointLight.cs


示例6: EvaluateShadow

 public override void EvaluateShadow(ShadePointInfo pt, float u0, float u1, float u2, out IColorType radiance, out float pdf, out RayData ray)
 {
     var dir = -(Position - pt.HitPoint);
     var l2 = dir.Length2();
     var l = MathLab.Sqrt(l2);
     dir.Normalize();
     pdf = MC.UniformSpherePdf();
     ray = new RayData(ref pt.HitPoint, ref dir, 1e-4f, l - 1e-4f);
     radiance = power.Mul(1f / l);
     //float theta = Vector.SphericalTheta(ref dir);
     //Profile.Evaluate(Vector.SphericalPhi(ref dir) * MathLab.INVTWOPI, theta * MathLab.INVPI);
 }
开发者ID:HungryBear,项目名称:rayden,代码行数:12,代码来源:PointLight.cs


示例7: Render

		public override void Render(IVertexSource vertexSource, int pathIndexToRender, IColorType colorBytes)
		{
			rasterizer.reset();
			Affine transform = GetTransform();
			if (!transform.is_identity())
			{
				vertexSource = new VertexSourceApplyTransform(vertexSource, transform);
			}
			rasterizer.add_path(vertexSource, pathIndexToRender);
			if (destImageByte != null)
			{
				scanlineRenderer.RenderSolid(destImageByte, rasterizer, m_ScanlineCache, colorBytes.GetAsRGBA_Bytes());
				DestImage.MarkImageChanged();
			}
			else
			{
				scanlineRenderer.RenderSolid(destImageFloat, rasterizer, m_ScanlineCache, colorBytes.GetAsRGBA_Floats());
				destImageFloat.MarkImageChanged();
			}
		}
开发者ID:CNCBrasil,项目名称:agg-sharp,代码行数:20,代码来源:ImageGraphics2D.cs


示例8: FillRectangle

		public abstract void FillRectangle(double left, double bottom, double right, double top, IColorType fillColor);
开发者ID:glocklueng,项目名称:agg-sharp,代码行数:1,代码来源:Graphics2D.cs


示例9: Render

		public void Render(IVertexSource vertexSource, Vector2 position, IColorType color)
		{
			Render(new VertexSourceApplyTransform(vertexSource, Affine.NewTranslation(position.x, position.y)), 0, color);
		}
开发者ID:glocklueng,项目名称:agg-sharp,代码行数:4,代码来源:Graphics2D.cs


示例10: Clear

		public abstract void Clear(IColorType color);
开发者ID:glocklueng,项目名称:agg-sharp,代码行数:1,代码来源:Graphics2D.cs


示例11: FillRectangle

		public override void FillRectangle(double left, double bottom, double right, double top, IColorType fillColor)
		{
			RoundedRect rect = new RoundedRect(left, bottom, right, top, 0);
			Render(rect, fillColor.GetAsRGBA_Bytes());
		}
开发者ID:CNCBrasil,项目名称:agg-sharp,代码行数:5,代码来源:ImageGraphics2D.cs


示例12: ActiveColor

 public void ActiveColor(IColorType c)
 {
     m_active_color = c.GetAsRGBA_Doubles();
 }
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:4,代码来源:CheckBoxWidget.cs


示例13: BackgroundColor

 public void BackgroundColor(IColorType bk)
 {
     unsafe { m_pixf.MakePixel(m_pBackBufferColor, bk); }
 }
开发者ID:GeroL,项目名称:MOSA-Project,代码行数:4,代码来源:RasterBufferAccessors.cs


示例14: Clear

 //--------------------------------------------------------------------
 public void Clear(IColorType in_c)
 {
     uint y;
     RGBA_Bytes c = new RGBA_Bytes(in_c.R_Byte, in_c.G_Byte, in_c.B_Byte, in_c.A_Byte);
     if (Width != 0)
     {
         for (y = 0; y < Height; y++)
         {
             base.CopyHorizontalLine(0, (int)y, Width, c);
         }
     }
 }
开发者ID:tea,项目名称:MOSA-Project,代码行数:13,代码来源:ClippingProxy.cs


示例15: span_image_filter_rgba_bilinear_clip

 public span_image_filter_rgba_bilinear_clip(IImageBufferAccessor src,
     IColorType back_color, ISpanInterpolator inter)
     : base(src, inter, null)
 {
     m_OutsideSourceColor = back_color.GetAsRGBA_Bytes();
 }
开发者ID:Wiladams,项目名称:NewTOAPIA,代码行数:6,代码来源:span_image_filter_rgba.cs


示例16: Clear

		public override void Clear(IColorType iColor)
		{
			RectangleDouble clippingRect = GetClippingRect();
			RectangleInt clippingRectInt = new RectangleInt((int)clippingRect.Left, (int)clippingRect.Bottom, (int)clippingRect.Right, (int)clippingRect.Top);

			if (DestImage != null)
			{
				RGBA_Bytes color = iColor.GetAsRGBA_Bytes();
				int width = DestImage.Width;
				int height = DestImage.Height;
				byte[] buffer = DestImage.GetBuffer();
				switch (DestImage.BitDepth)
				{
					case 8:
						{
							byte byteColor = (byte)iColor.Red0To255;
							for (int y = clippingRectInt.Bottom; y < clippingRectInt.Top; y++)
							{
								int bufferOffset = DestImage.GetBufferOffsetXY((int)clippingRect.Left, y);
								int bytesBetweenPixels = DestImage.GetBytesBetweenPixelsInclusive();
								for (int x = 0; x < clippingRectInt.Width; x++)
								{
									buffer[bufferOffset] = color.blue;
									bufferOffset += bytesBetweenPixels;
								}
							}
						}
						break;

					case 24:
						for (int y = clippingRectInt.Bottom; y < clippingRectInt.Top; y++)
						{
							int bufferOffset = DestImage.GetBufferOffsetXY((int)clippingRect.Left, y);
							int bytesBetweenPixels = DestImage.GetBytesBetweenPixelsInclusive();
							for (int x = 0; x < clippingRectInt.Width; x++)
							{
								buffer[bufferOffset + 0] = color.blue;
								buffer[bufferOffset + 1] = color.green;
								buffer[bufferOffset + 2] = color.red;
								bufferOffset += bytesBetweenPixels;
							}
						}
						break;

					case 32:
						{
							for (int y = clippingRectInt.Bottom; y < clippingRectInt.Top; y++)
							{
								int bufferOffset = DestImage.GetBufferOffsetXY((int)clippingRect.Left, y);
								int bytesBetweenPixels = DestImage.GetBytesBetweenPixelsInclusive();
								for (int x = 0; x < clippingRectInt.Width; x++)
								{
									buffer[bufferOffset + 0] = color.blue;
									buffer[bufferOffset + 1] = color.green;
									buffer[bufferOffset + 2] = color.red;
									buffer[bufferOffset + 3] = color.alpha;
									bufferOffset += bytesBetweenPixels;
								}
							}
						}
						break;

					default:
						throw new NotImplementedException();
				}
			}
			else // it is a float
			{
				if (DestImageFloat == null)
				{
					throw new Exception("You have to have either a byte or float DestImage.");
				}

				RGBA_Floats color = iColor.GetAsRGBA_Floats();
				int width = DestImageFloat.Width;
				int height = DestImageFloat.Height;
				float[] buffer = DestImageFloat.GetBuffer();
				switch (DestImageFloat.BitDepth)
				{
					case 128:
						for (int y = 0; y < height; y++)
						{
							int bufferOffset = DestImageFloat.GetBufferOffsetXY(clippingRectInt.Left, y);
							int bytesBetweenPixels = DestImageFloat.GetFloatsBetweenPixelsInclusive();
							for (int x = 0; x < clippingRectInt.Width; x++)
							{
								buffer[bufferOffset + 0] = color.blue;
								buffer[bufferOffset + 1] = color.green;
								buffer[bufferOffset + 2] = color.red;
								buffer[bufferOffset + 3] = color.alpha;
								bufferOffset += bytesBetweenPixels;
							}
						}
						break;

					default:
						throw new NotImplementedException();
				}
			}
		}
开发者ID:CNCBrasil,项目名称:agg-sharp,代码行数:100,代码来源:ImageGraphics2D.cs


示例17: background_color

 public void background_color(IColorType v) { m_OutsideSourceColor = v.GetAsRGBA_Bytes(); }
开发者ID:Wiladams,项目名称:NewTOAPIA,代码行数:1,代码来源:span_image_filter_rgba.cs


示例18: span_image_filter_rgb_bilinear_clip

        //--------------------------------------------------------------------
        public span_image_filter_rgb_bilinear_clip(IRasterBufferAccessor src,
											IColorType back_color,
											ISpanInterpolator inter)
            : base(src, inter, null)
        {
            m_back_color = back_color.GetAsRGBA_Bytes();
            OrderR = src.PixelFormat.Blender.OrderR;
            OrderG = src.PixelFormat.Blender.OrderG;
            OrderB = src.PixelFormat.Blender.OrderB;
            OrderA = src.PixelFormat.Blender.OrderA;
        }
开发者ID:GeroL,项目名称:MOSA-Project,代码行数:12,代码来源:SpanImageFilterRGB.cs


示例19: MakePixel

 public unsafe override void MakePixel(byte* p, IColorType c)
 {
     throw new System.NotImplementedException();
 }
开发者ID:tea,项目名称:MOSA-Project,代码行数:4,代码来源:ClippingProxy.cs


示例20: background_color

 public void background_color(IColorType v)
 {
     m_back_color = v.GetAsRGBA_Bytes();
 }
开发者ID:GeroL,项目名称:MOSA-Project,代码行数:4,代码来源:SpanImageFilterRGB.cs



注:本文中的IColorType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IColumn类代码示例发布时间:2022-05-24
下一篇:
C# IColor类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap