示例#1
0
        /// <inheritdoc />
        public void Draw(Window window, Camera camera)
        {
            ScreenPoint pos = camera.WorldToViewportPosition(Position.PixelTranslate(Rect.BottomLeft));
            int         w   = HMath.RoundToInt(Rect.Extents.X * 2);
            int         h   = HMath.RoundToInt(Rect.Extents.Y * 2);

            ScreenRect rect = new ScreenRect(pos.X, pos.Y, w, h);

            window.DrawRect(rect, Fill, Color);
        }