0
私はTclをあまりよくしていませんが、私はこのコードを使っていくつかのシステムを視覚化しています。誰もこの下のコードの生産のデフォルトのフォントを変更すると私を助けることができますか?Tclのデフォルトのフォントサイズを変更する方法
私は、コードの先頭にこれを入れてみましたが、それはうまくいきませんでした:
proc DisplayModel2D { {ShapeType nill} {dAmp 5} {xLoc 10} {yLoc 10} {xPixels 512} {yPixels 384} {nEigen 1} } {
global TunitTXT
global ScreenResolutionX ScreenResolutionY
if { [info exists TunitTXT] != 1} {set TunitTXT ""}
if { [info exists ScreenResolutionX] != 1} {set ScreenResolutionX 1024}
if { [info exists ScreenResolutionY] != 1} {set ScreenResolutionY 768}
if {$xPixels == 0} {
set xPixels [expr int($ScreenResolutionX/2)];
set yPixels [expr int($ScreenResolutionY/2)];
set xLoc 10
set yLoc 10
}
if {$ShapeType == "nill"} {
puts ""; puts ""; puts "------------------"
puts "View the Model? (N)odes, (D)eformedShape, anyMode(1),(2),(#). Press enter for NO."
gets stdin answer
if {[llength $answer]>0 } {
if {$answer != "N" & $answer != "n"} {
puts "Modify View Scaling Factor=$dAmp? Type factor, or press enter for NO."
gets stdin answerdAmp
if {[llength $answerdAmp]>0 } {
set dAmp $answerdAmp
}
}
if {[string index $answer 0] == "N" || [string index $answer 0] == "n"} {
set ShapeType NodeNumbers
} elseif {[string index $answer 0] == "D" ||[string index $answer 0] == "d" } {
set ShapeType DeformedShape
} else {
set ShapeType ModeShape
set nEigen $answer
}
} else {
return
}
}
if {$ShapeType == "ModeShape" } {
set lambdaN [eigen $nEigen]; # perform eigenvalue analysis for ModeShape
set lambda [lindex $lambdaN [expr $nEigen-1]];
set omega [expr pow($lambda,0.5)]
set PI [expr 2*asin(1.0)]; # define constant
set Tperiod [expr 2*$PI/$omega]; # period (sec.)
set fmt1 "Mode Shape, Mode=%.1i Period=%.3f %s "
set windowTitle [format $fmt1 $nEigen $Tperiod $TunitTXT]
} elseif {$ShapeType == "NodeNumbers" } {
set windowTitle "Node Numbers"
} elseif {$ShapeType == "DeformedShape" } {
set windowTitle "Deformed Shape"
}
set viewPlane XY
recorder display $windowTitle $xLoc $yLoc $xPixels $yPixels -wipe ; # display recorder
DisplayPlane $ShapeType $dAmp $viewPlane $nEigen 0
}
Peterありがとう:)) –