当前位置: 首页>>代码示例>>C#>>正文


C# Pictor.RGBA_Bytes类代码示例

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


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

示例1: BlendSolidVerticalSpan

        //--------------------------------------------------------------------
        public unsafe override void BlendSolidVerticalSpan(int x, int y,
										  uint len,
										  RGBA_Bytes c,
										  byte* covers)
        {
            PixelFormat.BlendSolidHorizontalSpan(y, x, len, c, covers);
        }
开发者ID:davidleon,项目名称:MOSA-Project,代码行数:8,代码来源:Transposer.cs

示例2: copy_bar

        /*
        //--------------------------------------------------------------------
        public void copy_bar(int x1, int y1, int x2, int y2, IColorType c)
        {
            RectI rc(x1, y1, x2, y2);
            rc.Normalize();
            if(rc.Clip(ClipBox()))
            {
                int y;
                for(y = rc.y1; y <= rc.y2; y++)
                {
                    m_ren->CopyHorizontalLine(rc.x1, y, uint(rc.x2 - rc.x1 + 1), c);
                }
            }
        }

        //--------------------------------------------------------------------
        public void blend_bar(int x1, int y1, int x2, int y2,
                       IColorType c, byte cover)
        {
            RectI rc(x1, y1, x2, y2);
            rc.Normalize();
            if(rc.Clip(ClipBox()))
            {
                int y;
                for(y = rc.y1; y <= rc.y2; y++)
                {
                    m_ren->BlendHorizontalLine(rc.x1,
                                       y,
                                       uint(rc.x2 - rc.x1 + 1),
                                       c,
                                       cover);
                }
            }
        }
         */
        //--------------------------------------------------------------------
        public unsafe override void BlendSolidHorizontalSpan(int x, int y, uint in_len, RGBA_Bytes c, byte* covers)
        {
            int len = (int)in_len;
            if (y > MaxY) return;
            if(y < MinY) return;

            if(x < MinX)
            {
                len -= MinX - x;
                if(len <= 0) return;
                covers += MinX - x;
                x = MinX;
            }
            if(x + len > MaxX)
            {
                len = MaxX - x + 1;
                if(len <= 0) return;
            }
            base.BlendSolidHorizontalSpan(x, y, (uint)len, c, covers);
        }
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:57,代码来源:ClippingProxy.cs

示例3: Render

 /// <summary>
 /// 
 /// </summary>
 /// <param name="vertexSource"></param>
 /// <param name="idx"></param>
 /// <param name="color"></param>
 public void Render(IVertexSource vertexSource, uint idx, RGBA_Bytes color)
 {
     m_Rasterizer.Reset();
     Affine transform = Transform;
     if (!transform.IsIdentity())
     {
         vertexSource = new TransformationConverter(vertexSource, transform);
     }
     m_Rasterizer.AddPath(vertexSource, idx);
     Renderer.RenderSolid(m_PixelFormat, m_Rasterizer, m_Scanline, color);
 }
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:17,代码来源:ScanlineRenderer.cs

示例4: Line

 public void Line(PointD Start, PointD End, RGBA_Bytes color)
 {
     Line(Start.x, Start.y, End.x, End.y, color);
 }
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:4,代码来源:ScanlineRenderer.cs

示例5: RenderSolid

 //========================================================render_scanlines
 public static void RenderSolid(IPixelFormat pixFormat, IRasterizer rasterizer, IScanline scanLine, RGBA_Bytes color)
 {
     if(rasterizer.RewindScanlines())
     {
         scanLine.Reset(rasterizer.MinX(), rasterizer.MaxX());
     #if use_timers
         PrepareTimer.Start();
     #endif
         //renderer.Prepare();
     #if use_timers
         PrepareTimer.Stop();
     #endif
         while(rasterizer.SweepScanline(scanLine))
         {
             Renderer.RenderSolidSingleScanLine(pixFormat, scanLine, color);
         }
     }
 }
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:19,代码来源:ScanlineRenderer.cs

示例6: Generate

 public unsafe abstract void Generate(RGBA_Bytes* span, int x, int y, uint len);
开发者ID:Boddlnagg,项目名称:MOSA-Project,代码行数:1,代码来源:SpanImageFilter.cs

示例7: Gradient

 //--------------------------------------------------------------------
 public RGBA_Bytes Gradient(RGBA_Bytes c, double k)
 {
     RGBA_Bytes ret = new RGBA_Bytes();
     uint ik = Basics.UnsignedRound(k * base_scale);
     ret.R_Byte = (byte)((uint)(R_Byte) + ((((uint)(c.R_Byte) - R_Byte) * ik) >> BaseShift));
     ret.G_Byte = (byte)((uint)(G_Byte) + ((((uint)(c.G_Byte) - G_Byte) * ik) >> BaseShift));
     ret.B_Byte = (byte)((uint)(B_Byte) + ((((uint)(c.B_Byte) - B_Byte) * ik) >> BaseShift));
     ret.A_Byte = (byte)((uint)(A_Byte) + ((((uint)(c.A_Byte) - A_Byte) * ik) >> BaseShift));
     return ret;
 }
开发者ID:hj1980,项目名称:Mosa,代码行数:11,代码来源:ColorRGBA.cs

示例8: RGBA_Bytes

 //--------------------------------------------------------------------
 RGBA_Bytes(RGBA_Bytes c, uint a_)
 {
     m_R = (byte)c.m_R;
     m_G = (byte)c.m_G;
     m_B = (byte)c.m_B;
     m_A = (byte)a_;
 }
开发者ID:hj1980,项目名称:Mosa,代码行数:8,代码来源:ColorRGBA.cs

示例9: CopyVerticalColorSpan

        //--------------------------------------------------------------------
        public unsafe override void CopyVerticalColorSpan(int x, int y, uint len, RGBA_Bytes* colors)
        {
            if(x > MaxX) return;
            if(x < MinX) return;

            if(y < MinY)
            {
                int d = MinY - y;
                len -= (uint)d;
                if(len <= 0) return;
                colors += d;
                y = MinY;
            }
            if(y + len > MaxY)
            {
                len = (uint)(MaxY - y + 1);
                if(len <= 0) return;
            }
            base.CopyVerticalColorSpan(x, y, len, colors);
        }
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:21,代码来源:ClippingProxy.cs

示例10: CopyHorizontalLine

        //--------------------------------------------------------------------
        public override void CopyHorizontalLine(int x1, int y, uint x2, RGBA_Bytes c)
        {
            if(x1 > x2) { int t = (int)x2; x2 = (uint)x1; x1 = t; }
            if(y  > MaxY) return;
            if(y  < MinY) return;
            if(x1 > MaxX) return;
            if(x2 < MinX) return;

            if(x1 < MinX) x1 = MinX;
            if(x2 > MaxX) x2 = (uint)MaxX;

            base.CopyHorizontalLine(x1, y, (uint)(x2 - x1 + 1), c);
        }
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:14,代码来源:ClippingProxy.cs

示例11: CopyHorizontalColorSpan

        //--------------------------------------------------------------------
        public unsafe override void CopyHorizontalColorSpan(int x, int y, uint len, RGBA_Bytes* colors)
        {
            if(y > MaxY) return;
            if(y < MinY) return;

            if(x < MinX)
            {
                int d = MinX - x;
                len -= (uint)d;
                if(len <= 0) return;
                colors += d;
                x = MinX;
            }
            if(x + len > MaxX)
            {
                len = (uint)(MaxX - x + 1);
                if(len <= 0) return;
            }
            base.CopyHorizontalColorSpan(x, y, len, colors);
        }
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:21,代码来源:ClippingProxy.cs

示例12: 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:rtownsend,项目名称:MOSA-Project,代码行数:13,代码来源:ClippingProxy.cs

示例13: BlendVerticalLine

        //--------------------------------------------------------------------
        public override void BlendVerticalLine(int x, int y1, int y2, RGBA_Bytes c, byte cover)
        {
            if(y1 > y2) { int t = y2; y2 = y1; y1 = t; }
            if(x  > MaxX) return;
            if(x  < MinX) return;
            if(y1 > MaxY) return;
            if(y2 < MinY) return;

            if(y1 < MinY) y1 = MinY;
            if(y2 > MaxY) y2 = MaxY;

            base.BlendVerticalLine(x, y1, y2, c, cover);
        }
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:14,代码来源:ClippingProxy.cs

示例14: BlendVerticalColorSpan

        //--------------------------------------------------------------------
        public unsafe override void BlendVerticalColorSpan(int x, int y, uint len, RGBA_Bytes* colors, byte* covers, byte cover)
        {
            if(x > MaxX) return;
            if(x < MinX) return;

            if(y < MinY)
            {
                int d = MinY - y;
                len -= (uint)d;
                if(len <= 0) return;
                if(covers != null) covers += d;
                colors += d;
                y = MinY;
            }
            if(y + len > MaxY)
            {
                len = (uint)(MaxY - y + 1);
                if(len <= 0) return;
            }
            base.BlendVerticalColorSpan(x, y, len, colors, covers, cover);
        }
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:22,代码来源:ClippingProxy.cs

示例15: BlendSolidVerticalSpan

        //--------------------------------------------------------------------
        public unsafe override void BlendSolidVerticalSpan(int x, int y, uint len, RGBA_Bytes c, byte* covers)
        {
            if(x > MaxX) return;
            if(x < MinX) return;

            if(y < MinY)
            {
                len -= (uint)(MinY - y);
                if(len <= 0) return;
                covers += MinY - y;
                y = MinY;
            }
            if(y + len > MaxY)
            {
                len = (uint)(MaxY - y + 1);
                if(len <= 0) return;
            }
            base.BlendSolidVerticalSpan(x, y, len, c, covers);
        }
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:20,代码来源:ClippingProxy.cs


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