
-----------------------------------
Nathan4102
Tue Oct 01, 2013 6:20 pm

Turing printing fuzzy images
-----------------------------------
I'm trying to print something straight off Turing, but it turns out looking awful. The image has roughly 1 inch margins on the left, top, and right, and then 2 or 3 inches on the bottom. Also, the text that's printed is very fuzzy. The text is drawn via various GUI functions and Font.Draw, and my screen size is 600 x 770,which is almost 1:1 to 8.5 x 11. Any ways I can fix this?  
Thanks!
Nathan

EDIT: Also is there a way to convert a boolean to a string, and vice versa? I'm having a bit of trouble with that at the moment... :p

-----------------------------------
DemonWasp
Tue Oct 01, 2013 7:13 pm

RE:Turing printing fuzzy images
-----------------------------------
The margins are probably beyond your help, because that's probably built into Turing. The fuzziness is almost certainly because you're printing at ~ 70 dots-per-inch (dpi). Clear-looking printing requires around 300 dpi and photo-quality starts around 600 dpi (very roughly).

Turing is definitely NOT the tool to use for publishing.

-----------------------------------
Nathan4102
Tue Oct 01, 2013 7:27 pm

RE:Turing printing fuzzy images
-----------------------------------
:/ I'll have to play around with this and try to figure something out then. Thanks

Also any idea about my Editted question? Something like:


var x : boolean := false
var y : string

y := "This is " + x %Gives error

-----------------------------------
tiedye1
Tue Oct 01, 2013 8:11 pm

Re: Turing printing fuzzy images
-----------------------------------
In response to your second question, there is no method defined in truing to convert stings to booleans and vise versa.  The easiest way would defiantly be a simple if else statement.

However, just because, there is technically a way to convert a boolean to a integer using type cheats.  This essentially reinterprets the raw bits that make up a value.  It it used in this fashion:


var x : boolean := false
var y : int := 0

cheat (boolean, y) := x

put y


Note that the raw boolean value (one bit) is imposed on the existing value so a default value of 0 is required for y.

Also note that doing it this way is completely pointless and I don't recommend it.  Just posting to expand your Turing knowledge  :)

-----------------------------------
DemonWasp
Wed Oct 02, 2013 12:35 am

RE:Turing printing fuzzy images
-----------------------------------
Or...


fcn boolstr ( boolean b ) : string
    if b then
        result "true"
    else
        result "false"
    end if
end boolstr

%...

var y : string := "This is " + boolstr(x)


That follows a similar format to the intstr() function that comes with Turing.
