public bool RectangleStart(Engine.Rectangle rect, Row r) { bool rc = true; switch (rect.DataElementOutput) { case DataElementOutputEnum.NoOutput: rc = false; break; case DataElementOutputEnum.Output: if (rowstart != null) // In case no items in row are visible { // we delay until we get one. tw.Write(rowstart); rowstart = null; } PushContainer(rect.DataElementName); break; case DataElementOutputEnum.Auto: case DataElementOutputEnum.ContentsOnly: default: break; } return(rc); }
public void RectangleEnd(Engine.Rectangle rect, Row r) { if (rect.DataElementOutput != DataElementOutputEnum.Output) { return; } PopContainer(rect.DataElementName); }
public void RectangleEnd(Engine.Rectangle rect, Row r) { }
public bool RectangleStart(Engine.Rectangle rect, Row r) { return(true); }
public static Engine.Surface.Canvas CopyFromImage(Engine.Surface.Canvas source, Engine.Rectangle region) { // if rectangle goes outside of the boundaries of the source, some pixels will not be set, // therefore fill the result first to ensure complete byte data Engine.Surface.Canvas dest = new Canvas(region.Size.Width, region.Size.Height, Engine.Colors.Teal); // calc origin of new image on source to start copy // originX originY are coords of source image // destX and destY are coords of new image int originX = 0; int destX = 0; int width = 0; int originY = 0; int destY = 0; int height = 0; //..................... if (region.Point.X < 0) { originX = 0; destX = Math.Abs(region.Point.X); width = dest.Width - destX; } else if (dest.Width + region.Point.X > source.Width) { originX = region.Point.X; destX = 0; width = source.Width - region.Point.X; } else { originX = region.Point.X; width = dest.Width; } //..................... if (region.Point.Y < 0) { originY = 0; destY = Math.Abs(region.Point.Y); height = dest.Height - destY; } else if (dest.Height + region.Point.Y > source.Height) { originY = region.Point.Y; destY = 0; height = source.Height - region.Point.Y; } else { originY = region.Point.Y; height = dest.Height; } del_CopyFromImage a = thread_CopyFromImage; del_CopyFromImage b = thread_CopyFromImage; del_CopyFromImage c = thread_CopyFromImage; del_CopyFromImage d = thread_CopyFromImage; int quarterHeight = height / 4; int destY_a = destY, height_0 = quarterHeight; int destY_b = quarterHeight, height_1 = (quarterHeight * 2); int destY_c = (quarterHeight * 2), height_2 = (quarterHeight * 3); int destY_d = (quarterHeight * 3), height_3 = height; IAsyncResult cookie_a = a.BeginInvoke(source, dest, originX, originY, destX, destY_a, width, height_0, null, null); IAsyncResult cookie_b = b.BeginInvoke(source, dest, originX, originY, destX, destY_b, width, height_1, null, null); IAsyncResult cookie_c = c.BeginInvoke(source, dest, originX, originY, destX, destY_c, width, height_2, null, null); IAsyncResult cookie_d = d.BeginInvoke(source, dest, originX, originY, destX, destY_d, width, height_3, null, null); a.EndInvoke(cookie_a); b.EndInvoke(cookie_b); c.EndInvoke(cookie_c); d.EndInvoke(cookie_d); return(dest); }