Esempio n. 1
0
        public void BeforeActorsRender(IDrawingContext context)
        {
            var allocVector = new Vector2D(_drawingArea.Allocation.Width, _drawingArea.Allocation.Height);

            context.DrawRect(Vector2D.Zero, allocVector, _defaultColor);

            _frameStartTime = DateTimeOffset.Now.ToUnixTimeMilliseconds();
#if DEBUG
            context.Restrict(HeadSize);
#endif
        }
Esempio n. 2
0
        protected override void OnRender(IDrawingContext context, Rect bounds, double opacity)
        {
            base.OnRender(context, bounds, opacity);

            Rectangle rectangle = WpfElement as Rectangle;

            DrawingStyle style = DrawingStyle.FromElement(this);

            style.Fill            = rectangle.Fill;
            style.Stroke          = rectangle.Stroke;
            style.StrokeThickness = new Thickness(rectangle.StrokeThickness);
            style.Opacity         = opacity;

            context.DrawRect(bounds, style);
        }
Esempio n. 3
0
        protected override void OnRender(IDrawingContext context, Rect bounds, double opacity)
        {
            base.OnRender(context, bounds, opacity);

            Border border = WpfElement as Border;

            DrawingStyle style = DrawingStyle.FromElement(this);

            style.CornerRadius    = border.CornerRadius;
            style.Fill            = border.Background;
            style.Stroke          = border.BorderBrush;
            style.StrokeThickness = border.BorderThickness;
            style.Opacity         = opacity;

            context.DrawRect(bounds, style);

            if (border.ClipToBounds)
            {
                context.ClipRect(bounds, border.CornerRadius);
            }
        }
Esempio n. 4
0
 public override void OnRender(IDrawingContext context)
 {
     context.DrawRect(Location, Size, FillColor);
 }
Esempio n. 5
0
 public override void OnRender(IDrawingContext context)
 {
     context.DrawRect(Vector2D.Zero, new Vector2D(context.GetViewportWidth(), context.GetViewportHeight()), Color3.Black);
 }