internal void PaintImageInShape(Graphics g) { List <Image> imagesActual = new List <Image>(); List <Image> images = new List <Image>(); List <string> strings = new List <string>(); bool isReturnImage = FontMgr.GenerateBmps(imagesActual, images, strings); if (!isReturnImage) { return; } //Create shape Image image; image = images[0]; //shape.Save("C:\\a.png",ImageFormat.Png); Font.FontFileName = FontMgr.FontFileName; if (FrameSizeFixed) { Font.Size = FontMgr.FontHeight / Zoom; } if (FontMgr.Bold) { Font.Style = Font.Style | FontStyle.Bold; } else { Font.Style = Font.Style & ((FontStyle.Bold | FontStyle.Italic | FontStyle.Strikeout | FontStyle.Underline) ^ FontStyle.Bold); } if (FontMgr.Italic) { Font.Style = FontStyle.Italic; } else { Font.Style = Font.Style & ((FontStyle.Bold | FontStyle.Italic | FontStyle.Strikeout | FontStyle.Underline) ^ FontStyle.Italic); } //Label shape _labelImage = image; _labelImageActual = imagesActual[0]; if (g == null) //get _labelImage, and _labelImageActual then exit { return; } Rectangle imageRectangle = new Rectangle(VirtualBounds.X, VirtualBounds.Y, image.Width, image.Height); VirtualBounds = imageRectangle; g.DrawImage(image, new Rectangle(VirtualBounds.X, VirtualBounds.Y, image.Width, image.Height)); this._paintAction = PaintActionType.None; }
internal void DrawString(bool hideGrid) { FontMgrSetup(FrameSizeFixed, FontSizeFixed, hideGrid); List <Image> imagesActual = new List <Image>(); List <Image> images = new List <Image>(); List <string> strings = new List <string>(); FontMgr.GenerateBmps(imagesActual, images, strings); if (images.Count > 0) { BitmapOverlay = images[0]; base.InnerImage = new Bitmap(BitmapOverlay); } }