Page 1 of 1

TextObject rotate and smoothing

Posted: Mon Jan 26, 2026 12:47 pm
by amyren
I notice that although not mention in the help for DisplayTextObject, you can rotate the text by passing a rotate argument.
Is this just forgotten in the manual or am I supposed to have catched this elsewhere in the docs?

With RotateTextObject you can also set the smooth tag to true. But I find that the smothening effect is quite negligible.
Similar if I rotate a brush and set the smooth tag, I can hardly notice any smoothening effect. Am I using the smooth tag wrong?

Displaying the text as a blured brush will make it apear anti-alised.
In the example below I saved and loaded the textobject as a jpg file to make it a non-palette brush for the blurbrush command. Is there a better way to make the brush non-palette?

Code: Select all

SetDefaultLoader(#LOADER_FONT, "inbuilt")
SetFont(#SERIF, 72)
SetFontColor(#WHITE)

CreateTextObject(1, "TEST_test")

CreateTextObject(2, "TEST_test")
RotateTextObject(2, 15)

CreateTextObject(3, "TEST_test")
RotateTextObject(3, 15, True)

DisplayTextObject(1, 100, 80, {Rotate = 15})
DisplayTextObject(2, 100, 80)
DisplayTextObject(3, 100, 160)

ConvertToBrush(#TEXTOBJECT, 1, 1)
RotateBrush(1, 15, 1, 1, True)

SaveBrush(1, "testbrush.jpg", {Format = #IMGFMT_JPEG, Quality = 100})
LoadBrush(2, "testbrush.jpg")
BlurBrush(2)
DisplayBrush(2, 100, 320)

DisplayBrush(1, 100, 240)

WaitLeftMouse


Re: TextObject rotate and smoothing

Posted: Fri Jan 30, 2026 3:41 pm
by amyren
What I am looking for is a way to apply a smoothen / anti-aliase effect to an image.

It seems that the smooth variable for RotateBrush did not have any smoothening effect unless the scaling is active.
BlurBrush will give a similar effect. Another method I found was to use ScaleBrush to scale the image slightly up, and then scale it back to original size while using smooth.
Is there another way to smoothen without distortion?

Re: TextObject rotate and smoothing

Posted: Sat Jan 31, 2026 3:17 pm
by airsoftsoftwair
amyren wrote: Mon Jan 26, 2026 12:47 pm I notice that although not mention in the help for DisplayTextObject, you can rotate the text by passing a rotate argument.
Is this just forgotten in the manual or am I supposed to have catched this elsewhere in the docs?
No, looks like this is missing in the manual. Of course DisplayTextObject() also supports standard draw tags just like the other drawing functions like DisplayBrush() etc. I'll fix this in the manual.
amyren wrote: Mon Jan 26, 2026 12:47 pm With RotateTextObject you can also set the smooth tag to true. But I find that the smothening effect is quite negligible.
Similar if I rotate a brush and set the smooth tag, I can hardly notice any smoothening effect. Am I using the smooth tag wrong?
Hard to tell without some image examples / MCVE but you're probably using text with anti-alias so that already has smooth edges. That's why I'd guess that toggling the smooth tag doesn't have that much of an effect because obviously the source pixels already have smooth edges so they will also be in the rotated image even if smoothing is turned off.
amyren wrote: Mon Jan 26, 2026 12:47 pm In the example below I saved and loaded the textobject as a jpg file to make it a non-palette brush for the blurbrush command. Is there a better way to make the brush non-palette?
What about RemoveBrushPalette()?

Re: TextObject rotate and smoothing

Posted: Tue Feb 03, 2026 3:07 pm
by amyren
Thanks, somehow I managed to overlook RemoveBrushPalette.