Vector Drawing Lib - Shifted Output

Post bugreports for the Windows version here
User avatar
mhs
Enthusiast
Enthusiast
Posts: 101
Joined: Thu Jul 02, 2015 4:53 pm
Location: Germany
Contact:

Vector Drawing Lib - Shifted Output

Post 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.
collectordave
Addict
Addict
Posts: 1310
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Vector Drawing Lib - Shifted Output

Post by collectordave »

+1
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
collectordave
Addict
Addict
Posts: 1310
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Vector Drawing Lib - Shifted Output

Post 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
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
collectordave
Addict
Addict
Posts: 1310
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Vector Drawing Lib - Shifted Output

Post by collectordave »

Solution found for windows not for OSX or Linux

See the code here

http://www.purebasic.fr/english/viewtop ... 12&t=65192
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
collectordave
Addict
Addict
Posts: 1310
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Vector Drawing Lib - Shifted Output

Post by collectordave »

Solution for windows and OSX now.

See this topic

http://www.purebasic.fr/english/viewtop ... 12&t=65192
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
Post Reply