Ejemplo n.º 1
0
        public override void Draw(RendererContext rc)
        {
            Vector2 pos = Position.Xy;
            Vector2 size = Scaling.Xy;
            Color4 col = Color;

            if (!Filled)
                rc.DrawRectangleAbsolute(ref pos, ref size, LineWidth, ref col);
            else
                rc.DrawFilledRectangleAbsolute(ref pos, ref size, ref col, 1);
        }
Ejemplo n.º 2
0
        public override void DrawInstanced(RendererContext rc, int count)
        {
            Vector2 pos = Vector2.Zero;
            Vector2 size = new Vector2(1, 1);
            Color4 col = new Color4(0, 0, 0, 0);

            if (!Filled)
                rc.DrawRectangleAbsolute(ref pos, ref size, LineWidth, ref col);
            else
                rc.DrawFilledRectangleAbsolute(ref pos, ref size, ref col, count);
        }