GraphicsPath axis offset?

I must be missing something but whenever I try to use a GraphicsPath object, it wants to set y=0 exactly halfway down the canvas. I don’t see this documented anywhere, but I don’t see anybody complaining about it either, which makes me wonder if there is somewhere something I’ve set wrong somehow.

Anyways, simply code in a canvas paint method:

[code]Var gp As New GraphicsPath

g.AntiAlias = True
//some regular lines
g.DrawingColor = &cffffff
g.DrawingColor = &c000000

//some lines that should be…elsewhere
g.DrawingColor = &ccc1233
g.DrawPath gp

//and a rectangle that should outline the fill rectangle above, but doesn’t (for me).
var g2 as new GraphicsPath
g.DrawPath g2

Yields the black lines from the DrawLine calls right in the middle as expected and the filled rectangle inset 5 pixels from all sides, but then the GraphicsPath objects are all halfway down the window.

I presume there is something stupid I have missed, either a document describing this…um, unique… coordinate system, or I have something somewhere that influences GraphicsPaths all on their own. Mac OS Mojave, Xojo 2019R3.1. Thanks for insights.

I’d say file a bug report as it definitely looks like something is wrong
x=0, y=0 is at the left edge half way down which seems really wrong

this is code to draw from the middle to all for corners of a canvas but it makes no sense

Var gp As New GraphicsPath

g.DrawingColor = &cFFFF0000





g.DrawPath gp

Thanks for confirming I’m not insane.

Bug report 60769 - Y-axis mislocated for GraphicsPath

seems mac specific

Actually gets crazier. If I now embed this within a pretty standard print wrapper and save as pdf, the Y-axis ends up about 40 points below the regular y=0 position near the top of the page. But x=0 is the very edge of the page while the regular DrawLine calls are honoring margins. (The wrapper, from the reference, if anyone cares

Var ps As New PrinterSetup If ps.ShowPageSetupDialog Then Var g As Graphics g = ps.ShowPrinterDialog() If g <> Nil Then (code as in original post)

thought this was going to do nice things for me, but heading back to Object2D stuff while this gets sorted out…