Esempio n. 1
0
        protected virtual void RenderSolidSingleScanLine(IImageByte destImage, IScanlineCache scanLine, RGBA_Bytes color)
        {
            int          y            = scanLine.y();
            int          num_spans    = scanLine.num_spans();
            ScanlineSpan scanlineSpan = scanLine.begin();

            byte[] ManagedCoversArray = scanLine.GetCovers();
            for (; ;)
            {
                int x = scanlineSpan.x;
                if (scanlineSpan.len > 0)
                {
                    destImage.blend_solid_hspan(x, y, scanlineSpan.len, color, ManagedCoversArray, scanlineSpan.cover_index);
                }
                else
                {
                    int x2 = (x - (int)scanlineSpan.len - 1);
                    destImage.blend_hline(x, y, x2, color, ManagedCoversArray[scanlineSpan.cover_index]);
                }
                if (--num_spans == 0)
                {
                    break;
                }
                scanlineSpan = scanLine.GetNextScanlineSpan();
            }
        }
Esempio n. 2
0
		protected virtual void RenderSolidSingleScanLine(IImageByte destImage, IScanlineCache scanLine, RGBA_Bytes color)
		{
			int y = scanLine.y();
			int num_spans = scanLine.num_spans();
			ScanlineSpan scanlineSpan = scanLine.begin();

			byte[] ManagedCoversArray = scanLine.GetCovers();
			for (; ; )
			{
				int x = scanlineSpan.x;
				if (scanlineSpan.len > 0)
				{
					destImage.blend_solid_hspan(x, y, scanlineSpan.len, color, ManagedCoversArray, scanlineSpan.cover_index);
				}
				else
				{
					int x2 = (x - (int)scanlineSpan.len - 1);
					destImage.blend_hline(x, y, x2, color, ManagedCoversArray[scanlineSpan.cover_index]);
				}
				if (--num_spans == 0) break;
				scanlineSpan = scanLine.GetNextScanlineSpan();
			}
		}
Esempio n. 3
0
 public virtual void blend_solid_hspan(int x, int y, int len, RGBA_Bytes c, byte[] covers, int coversIndex)
 {
     linkedImage.blend_solid_hspan(x, y, len, c, covers, coversIndex);
 }