internal override void ProcessRenderingElementContent(RPLElement rplElement, GdiContext context, RectangleF bounds) { ImagePositionPX = new RectangleF(0f, 0f, context.GdiWriter.ConvertToPixels(base.Position.Width), context.GdiWriter.ConvertToPixels(base.Position.Height)); RPLDynamicImageProps rPLDynamicImageProps = (RPLDynamicImageProps)InstanceProperties; Stream stream = rPLDynamicImageProps.DynamicImageContent; if (stream != null) { stream.Position = 0L; } else if (rPLDynamicImageProps.DynamicImageContentOffset >= 0) { byte[] image = context.RplReport.GetImage(rPLDynamicImageProps.DynamicImageContentOffset); if (image == null) { return; } stream = new MemoryStream(image); } if (stream != null) { Image = Image.FromStream(stream); ImagePosition = new RectangleF(base.Position.Location, base.Position.Size); GdiContext.CalculateUsableReportItemRectangle(InstanceProperties, ref ImagePosition); if (!(ImagePosition.Width <= 0f) && !(ImagePosition.Height <= 0f)) { ProcessImageMap(context); } } }
internal override void ProcessRenderingElementContent(RPLElement rplElement, GdiContext context, RectangleF bounds) { RPLTextBox rPLTextBox = rplElement as RPLTextBox; RPLTextBoxPropsDef rPLTextBoxPropsDef = DefinitionProperties as RPLTextBoxPropsDef; RPLTextBoxProps rPLTextBoxProps = InstanceProperties as RPLTextBoxProps; m_textPosition = new RectangleF(base.Position.X, base.Position.Y, base.Position.Width, base.Position.Height); GdiContext.CalculateUsableReportItemRectangle(InstanceProperties, ref m_textPosition); if (TextPosition.Width <= 0f || TextPosition.Height <= 0f) { return; } m_richTextBox = new TextBox(this); if (m_paragraphs == null) { m_paragraphs = new List <RenderingParagraph>(); } if (rPLTextBoxPropsDef.IsSimple) { RenderingParagraph renderingParagraph = new RenderingParagraph(); renderingParagraph.Initialize(rPLTextBox, TextPosition); renderingParagraph.ProcessRenderingElementContent(rPLTextBox, context, TextPosition); m_paragraphs.Add(renderingParagraph); } else { for (RPLParagraph nextParagraph = rPLTextBox.GetNextParagraph(); nextParagraph != null; nextParagraph = rPLTextBox.GetNextParagraph()) { RenderingParagraph renderingParagraph2 = new RenderingParagraph(); renderingParagraph2.Initialize(nextParagraph, TextPosition); renderingParagraph2.ProcessRenderingElementContent(nextParagraph, context, TextPosition); m_paragraphs.Add(renderingParagraph2); } } if (rPLTextBoxProps.IsToggleParent) { GetToggleImage(context.GdiWriter, out Bitmap _); m_textPosition.X += m_toggleRectangleMM.Width + 2.2f; m_textPosition.Width -= m_toggleRectangleMM.Width + 2.2f; Action action = new ToggleAction(InstanceProperties.UniqueName, rPLTextBoxProps.Label, m_toggleRectangleMM, rPLTextBoxProps.ToggleState); RegisterAction(context, action); } if (rPLTextBoxPropsDef.CanSort) { GetSortImage(context.GdiWriter, out Bitmap _, out SortOrder nextOrder); m_textPosition.Width -= m_sortRectangleMM.Width + 2.2f; if (m_sortRectangleMM.Width > 0f) { Action action2 = new SortAction(InstanceProperties.UniqueName, rPLTextBoxProps.Label, m_sortRectangleMM, nextOrder); RegisterAction(context, action2); } } ProcessActions(context, InstanceProperties.UniqueName, ((RPLTextBoxProps)InstanceProperties).ActionInfo, TextPosition); }
internal override void ProcessRenderingElementContent(RPLElement rplElement, GdiContext context, RectangleF bounds) { Image = RenderingItem.GetImage(context, ((RPLImageProps)InstanceProperties).Image); if (Image == null) { Image = GdiContext.ImageResources["InvalidImage"]; Sizing = RPLFormat.Sizings.Clip; } else { Sizing = ((RPLImagePropsDef)DefinitionProperties).Sizing; } ImagePosition = new RectangleF(base.Position.Location, base.Position.Size); GdiContext.CalculateUsableReportItemRectangle(InstanceProperties, ref ImagePosition); if (!(ImagePosition.Width <= 0f)) { _ = ImagePosition.Height; _ = 0f; } }