當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。