protected virtual void DrawBackground(ImageWithDeviceContext destImage) { if (BackgroundImage == null) { return; } ImageRenderer.StretchImageWithOutMargin(destImage, RealX, RealY, Size.Width, Size.Height, BackgroundImage, 0, BackgroundImage.Width, BackgroundImage.Height, BackgroundImageStretchExcludeMargin, Opacity); }
private void DrawImage(IDeviceContext destImage, LayeredPopupMenuItem item, Rectangle bounds, bool hovered) { ImageWithDeviceContext itemImage = ItemBackgroundImage; if (item.Checked || hovered) { itemImage = ItemHoveredBackgroundImage; } ImageRenderer.StretchImageWithOutMargin(destImage, bounds.X, bounds.Y, bounds.Width, bounds.Height, itemImage, 0, itemImage.Width, itemImage.Height, StretchMargin, 255); }
protected virtual void DrawBackground(ImageWithDeviceContext bufferImage) { ImageRenderer.StretchImageWithOutMargin(bufferImage, 0, 0, Width, Height, BackgroundImage, 0, BackgroundImage.Width, BackgroundImage.Height, StretchMargin, 255); }