Page 1 of 1

Vector Drawing Lib - Shifted Output

Posted: Thu Jan 21, 2016 8:36 am
by mhs
In regard to this topic: http://www.purebasic.fr/english/viewtop ... 14#p480414

I think that there is a "bug" in the vector drawing lib. I mean, that the physical edges of the output medium are ignored.

Example:

Code: Select all

DefaultPrinter()

LoadFont(0, "Arial", 10)

StartPrinting("Test")
StartVectorDrawing(PrinterVectorOutput(#PB_Unit_Millimeter))

VectorFont(FontID(0), 5)
MovePathCursor(20, 50)
DrawVectorText("Test")

StopVectorDrawing()
StopPrinting()
The output "Test" is placed in my case at 25mm left and 55mm top, because my printer has physical borders of 5mm around. If I print it on a image for preview, than the output is placed correct at 20/50mm. I would expect, that the output is placed at 20/50mm no matter, how thick the borders of the printer are or which printer/medium is used for the output. I would expect that the library corrects the output. Just think of the positioning of labels or the address box for letters that are not correct otherwise.

If the cursor is set left to 0mm and the printer has a border of 5mm, I would expect, that the output gets cropped...

In addition, a cross OS function that returns the physical borders would be nice.

Re: Vector Drawing Lib - Shifted Output

Posted: Sun Mar 06, 2016 8:15 am
by collectordave
+1

Re: Vector Drawing Lib - Shifted Output

Posted: Fri Mar 11, 2016 7:05 am
by collectordave
Hi
In addition, a cross OS function that returns the physical borders would be nice.
Starting to get some of the functions together and happened to find code to get the margins of the chosen printer plus some other bits. Check out this topic. http://www.purebasic.fr/english/viewtop ... 12&t=65132I have the windows ones and Wilbert has pointed me tp some for the MAC which I am now adapting and will post when tested.

Hope this helps you over the problem.

Regards

CD

Re: Vector Drawing Lib - Shifted Output

Posted: Wed Mar 16, 2016 4:34 am
by collectordave
Solution found for windows not for OSX or Linux

See the code here

http://www.purebasic.fr/english/viewtop ... 12&t=65192

Re: Vector Drawing Lib - Shifted Output

Posted: Thu Mar 17, 2016 6:04 am
by collectordave
Solution for windows and OSX now.

See this topic

http://www.purebasic.fr/english/viewtop ... 12&t=65192