Closed
Description
Monogame Packages: monogame.framework.desktopgl\3.8.1.303
public class DrawLineUi : Widget
{
public override void InternalRender(RenderContext context)
{
base.InternalRender(context);
var bounds = ActualBounds;
var start = new Vector2(0, bounds.Center.Y);
var end = new Vector2(bounds.Width, bounds.Center.Y);
context.DrawRectangle(bounds, Color.Black);
context.DrawLine(start, end, Color.Brown, thickness: 100);
context.DrawLine(start, end, Color.White, thickness: 1);
}
}
the render result is like this below:
because RenderContext::Drawline use SpriteBatch::Draw
internel, and use default "origin: (0,0)" which should be use (0, 0.5) for drawing lines?
expect result should be this below I suppose:
Metadata
Metadata
Assignees
Labels
No labels