This is a read-only mirror of pymolwiki.org

Difference between revisions of "CGO Text"

From PyMOL Wiki
Jump to navigation Jump to search
m (8 revisions)
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
[[Image:Cgo_text.png|thumb|CGO Text Example from following example|center|200px]]
 +
 
<source lang="python">
 
<source lang="python">
 
# draw text using cgo
 
# draw text using cgo
Line 20: Line 22:
 
</source>
 
</source>
  
[[Category:Scripting_Script_Library]]
+
[[Category:Script_Library]]
 +
[[Category:Math_Scripts]]
 +
[[Category:CGO]]

Latest revision as of 01:49, 28 March 2014

CGO Text Example from following example
# draw text using cgo
from pymol import cmd
from pymol.cgo import *
from pymol.vfont import plain

cgo = []

axes = [[2.0,0.0,0.0],[0.0,2.0,0.0],[0.0,0.0,2.0]]

pos = [0.0,0.0,0.0]
wire_text(cgo,plain,pos,'Hello World',axes)

pos = [0.0,-3.0,0.0]
cyl_text(cgo,plain,pos,'Hello Universe',0.10,axes=axes)

cmd.set("cgo_line_radius",0.03)
cmd.load_cgo(cgo,'txt')
cmd.zoom("all",2.0)