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 }
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); }
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); } }
public override void OnRender(IDrawingContext context) { context.DrawRect(Location, Size, FillColor); }
public override void OnRender(IDrawingContext context) { context.DrawRect(Vector2D.Zero, new Vector2D(context.GetViewportWidth(), context.GetViewportHeight()), Color3.Black); }