I have spent considerable time trying to figure out VectorDrawing. I started with 2DDrawing, which worked OK. I noticed that vector drawing had several advantages like user units,dashline,layers,etc. I just can not get it to work and I don't understand why. No compile errors & program runs and outputs a blank page. There is an example program on this forum which prints text and uses the transformation utilities to print rotated text. It works OK. I am interested only in drawing geometric figures, lines, etc.
Can anyone point me in the right direction?
Thanks in advance,
jd
Code: Select all
;DRAW A SHORT LINE USING VECTOR PRINTING
If PrintRequester()
If StartPrinting("PureBasic Test")
If StartVectorDrawing(PrinterVectorOutput())
Debug("INSIDE VECTOR DRAW")
cx.d = VectorOutputWidth() / 2 ; = 300
cy.d = VectorOutputHeight() / 2 ; = 400
Debug (cx.d):Debug(cy.d)
VectorSourceColor(RGBA(128, 128, 128, 128))
MovePathCursor(cx ,cy)
AddPathLine(40., 50.) ;SHOULD DRAW A LINE TO 40,50 FROM CENTER OF PAGE
StopVectorDrawing()
EndIf
StopPrinting()
EndIf
EndIf