示例#1
0
        private Rectangle ToScreenRectangle(OSDItem item)
        {
            var size = new Size(ItemCaptions.GetCaption(item, out int xOffset).Length *charSizePix.Width, charSizePix.Height);
            var loc  = ToScreenPoint(item, xOffset);

            return(new Rectangle(loc, size));
        }
示例#2
0
        public void Draw(OSDItem item, Graphics graphics)
        {
            var   caption = ItemCaptions.GetCaption(item, out int xOffset);
            Point loc     = ToScreenPoint(item, xOffset);

            foreach (var c in caption)
            {
                graphics.DrawImage(font[c], loc.X, loc.Y, charSizePix.Width, charSizePix.Height);
                loc.X += charSizePix.Width;
            }
        }