Correct… that is what “normalizing your coordinate system” means
If you canvas is 1000 wide and 500 high, and you wish YOUR coordinate system to show (0,0) as the Middle of the canvas
then you take YOUR (x,y) values and add 500 to X and 250 to Y, THEN set the point
Dave is correct. The canvas coordinate system cannot be made to match up with the coordinate system of the graph youre trying to create. You need to pick a center point and add that offset to your plot values.
On Mac you can translate the Graphics coordinate system like this
Sub translateGraphics(g As Graphics, x As CGFloat, y As CGFloat)
#if TargetCocoa then
declare sub CGContextTranslateCTM lib "CoreGraphics" (c As Ptr, tx As CGFloat, ty As CGFloat)
dim cntxt As Ptr = Ptr( g.Handle(Graphics.HandleTypeCGContextRef) )
CGContextTranslateCTM(cntxt, x, -y)
#endif
End Sub
and use like this (though an extension method would be more convenient)
[code]Sub Paint(g As Graphics, areas() As REALbasic.Rect)