DrawText with Double

Is there a way to actually draw text into a graphics using drawtext with double precision?
It always appears to round to integer values.

Eg DrawText(“Hello World”,200,199.75) = DrawText(“Hello World”,200,200)

FillRectangle supports it.
TextShape also does not support it

This is for mac and windows

I don’t agree with you.
For me, it is OK and there is a difference.
You can see it easily if you draw in a pdf file and zoom.
On screen, it is less visible.

Odd that you can see a difference.

Putting this code in the paint event of a window

g.FontSize = 40

g.DrawingColor = &cffffff
g.DrawingColor = &cff000055

g.DrawingColor = &C000000
g.AntiAliased = true
dim y as Double
for i as integer = 1 to 30
  y = y + 0.1
  g.DrawText("_",25 * i,20.0 + y)
next i

results in this, which clearly shows 10 dashs all aligning to same pixel.

This is on macOS 10.14.6 with Xojo 2020r1

Retina screens will align every 5 dashs, which makes sense.

Yes, it depends of screen resolution.
With my CAD software, RealCADD, I do a pdf almost as your example.
If you zoom on the pdf you can see that each — is at a different y.
But at 100%, perhaps you can’t see it…

Graphics has a scaleX and scaleY you could use that since PDFGraphocs is a subclass of Graphics.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.