The TextHorizontalAlignment only works for the first line using:
https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Display_DisplayPipeline_Draw3dText_1.htm
It seems that any alignment only works properly with the first line.
var text = "Hello" + Environment.NewLine + "World";
//var text = "Hello\nWorld";
args.Display.Draw3dText(text, args.WireColour,
Plane.WorldXY, 1, "Arial", false, false,
Rhino.DocObjects.TextHorizontalAlignment.Center,
Rhino.DocObjects.TextVerticalAlignment.Top);
Version 6 SR25
(6.25.20114.5271, 04/23/2020)
Related:
dale
(Dale Fugier)
2
@Alain, is this something you can help with?
Alain
(Alain Cormier)
3
That does look like a bug. It has been logged.
Thank you for reporting it.
1 Like
brian
(Brian Gillespie)
4
RH-58779 is fixed in the latest BETA
1 Like
Dmitriy
5
Hi there,
Multi-line still doesn’t work in Rhino 7.
Can somebody check?
Thank you in advance,
Dmitriy
dale
(Dale Fugier)
6
Hi @Dmitriy,
Seems to be working here.
TestDmitriy.cs (1.1 KB)
– Dale
Thanks, @dale
Hm… strange. Seems does not work on my side. I am running it from GH custom component from DrawViewportMeshes. Not sure if this makes any difference.
Kind regards,
Dmitriy