Hi William.
It's hard to be precise without seeing exactly what you are trying to do, but a combination of TranslateCoordinates and ScaleCoordinates should do the trick.
Code: Select all
If OpenWindow(0, 0, 0, 400, 200, "VectorDrawing", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 0, 0, 400, 200)
If StartVectorDrawing(CanvasVectorOutput(0))
;normal coordinates (blue)
VectorSourceColor(RGBA(0, 0, 255, 128))
MovePathCursor(40, 20)
For i = 1 To 4
AddPathLine(80, 0, #PB_Path_Relative)
AddPathLine(0, 40, #PB_Path_Relative)
Next i
StrokePath(10, #PB_Path_RoundCorner)
;FlipCoordinatesX(xflip)
xflip=200
MovePathCursor(0, 0)
TranslateCoordinates(xflip*2,0) ;for yflip use (0,yflip*2)
ScaleCoordinates(-1, 1) ;for yflip use (1,-1)
;flipped coordinates (red)
VectorSourceColor(RGBA(255, 0, 0, 128))
MovePathCursor(40, 20)
For i = 1 To 4
AddPathLine(80, 0, #PB_Path_Relative)
AddPathLine(0, 40, #PB_Path_Relative)
Next i
StrokePath(10, #PB_Path_RoundCorner)
;Draw mirror line
MovePathCursor(xflip,0)
AddPathLine(0,200, #PB_Path_Relative)
VectorSourceColor(RGBA(0,255, 0, 128))
DashPath(3,10, #PB_Path_RoundCorner)
StopVectorDrawing()
EndIf
EndIf
Please be aware that this behaves a little strangely with vector text, since the coordinates appear to reference the top left of the first character.
I hope that this is useful.
Kian