I attached a picture. In the left of it you can see what RMagick
generates for me and in the right you can see the example of clear text
I need RMagick to generate for me.
What can I do to get clear text. Any ideas?
Attachments:
http://www.ruby-forum.com/attachment/2862/Image_text.png
--
Posted via http://www.ruby-forum.com/.
Here is my code:
gc.stroke_width(1)
gc.pointsize(10)
gc.stroke('black')
gc.font_style(Magick::NormalStyle)
gc.font_weight(Magick::LighterWeight)
gc.text(x,y, "12:00")
Hi, Jim!
how can I turn off anti-aliasing?
I tried to call / not to call methods fill() and stroke().
result is different in all cases:
gc.fill('black') #results in:
Attachments:
http://www.ruby-forum.com/attachment/2863/fill_only.png
#gc.fill('black') # call is commented out
gc.stroke('black') # results in:
Attachments:
http://www.ruby-forum.com/attachment/2864/stroke_only.png
gc.fill('black')
gc.stroke('black') # calling both results in:
Attachments:
http://www.ruby-forum.com/attachment/2865/stroke___fill.png
Сomparing these three pictures you can see, that calling both methods
stroke() and fill() makes best picture, but I still need better.
Something like at attached picture (I used pixel editor :) to prepare
it)
And It seems to me that scaling down could not make accurate symbols.
Attachments:
http://www.ruby-forum.com/attachment/2866/needed.png
Hi, Jim!
It really works!! I just turned off antialiasing and got it!!!
Please take a look at the pictures. That is what I needed.
Thank you for your help!
Attachments:
http://www.ruby-forum.com/attachment/2873/1.png
Attachments:
http://www.ruby-forum.com/attachment/2874/2.png
One note more.
I've checked again and found that result defends on both callings
@gc.stroke('transparent').stroke_antialias(false)
@gc.text_antialias = false
the best result (which I showed upper) produced by calling both methods.