praeclarum / NGraphics

NGraphics is a cross platform library for rendering vector graphics on .NET. It provides a unified API for both immediate and retained mode graphics using high quality native renderers.
MIT License
710 stars 133 forks source link

DrawText draws text above specified Rect #23

Open Henkoglobin opened 9 years ago

Henkoglobin commented 9 years ago

Since ICanvas.DrawText accepts a Rect as its second parameter, I would expect it to draw the text INTO the specified Rect. However, both Android and iOS draw the text directly ABOVE it. This can be reproduced by drawing both the Rect and the Text:

    canvas.DrawRectangle(textRect, brush: Brushes.Green);
    canvas.DrawText(value.ToString(), textRect, _font, TextAlignment.Center, pen, brush);

NControl's implementation for Windows Phone, however, behaves exactly how I would expect it to.