public override Layout DoPageBreak() { using (new TraceContextPusher(_generator, _traceContext)) { // We never split a picture, so on a page break we always move all // of our content into a copy of ourself, and return that copy. This // leaves ourself empty, and the base class implementation will then // remove us from our container. PictureLayout copy = new PictureLayout(this); _image = null; // empty ourself return(copy); } }
/// <summary> /// Copy constructor used during layout expansion and page break handling. /// </summary> public PictureLayout(PictureLayout src) : base(src) { _filename = src._filename; _resourceId = src._resourceId; _image = src._image; // OK to copy by reference because the source layout will be dropped _width = src._width; _height = src._height; _imageBounds = src._imageBounds; _alignment = src._alignment; _scaleMode = src._scaleMode; _quality = src._quality; // _style = src._style; }
private void RenderPicture(PictureLayout layout, IContentContainer container) { }
private void RenderPictureLayout(PictureLayout layout, Page page) { Demon.PDF.Rectangle bounds = Convert.Rectangle(layout.ImageBounds); // bounds of the image within the layout page.AddImage(layout.Image.Size, layout.Image.RawData, 8, bounds); }