Changeset 4766
- Timestamp:
- Jan 14, 2021 11:15:32 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASIIplot.py ¶
r4765 r4766 9153 9153 GL.glDisable(GL.GL_COLOR_MATERIAL) 9154 9154 9155 def RenderLabel(x,y,z,label,r,color,matRot ):9155 def RenderLabel(x,y,z,label,r,color,matRot,offset=wx.RealPoint(0.,0.)): 9156 9156 ''' 9157 9157 color wx.Colour object … … 9165 9165 GL.glRotate(180,1,0,0) #fix to flip about x-axis 9166 9166 text = gltext.Text(text=' '+label,font=Font,foreground=color) 9167 text.draw_text(scale=0.025 )9167 text.draw_text(scale=0.025,position=offset) 9168 9168 GL.glEnable(GL.GL_LIGHTING) 9169 9169 GL.glPopMatrix() … … 9250 9250 RenderLabel(lx,ly,lz,lbl,radius,wxGreen,matRot) 9251 9251 ax,ay,az = xyz 9252 RenderLabel(ax,ay,az, ' '+atomB[0],radius,wxGreen,matRot)9252 RenderLabel(ax,ay,az,atomB[0],radius,wxGreen,matRot,offset=wx.RealPoint(0.,-.5)) 9253 9253 # find bonds 9254 9254 bondData = [[] for i in range(len(Atoms))] -
TabularUnified trunk/gltext.py ¶
r3136 r4766 99 99 #---Functions 100 100 101 def draw_text(self, position = wx. Point(0,0), scale = 1.0, rotation = 0):102 """ 103 position (wx. Point) - x/y Position to draw in scene101 def draw_text(self, position = wx.RealPoint(0.,0.), scale = 1.0, rotation = 0): 102 """ 103 position (wx.RealPoint) - x/y Position to draw in scene 104 104 scale (float) - Scale 105 105 rotation (int) - Rotation in degree … … 121 121 #Perform transformations 122 122 GL.glPushMatrix() 123 GL.glTranslate d(position.x, position.y, 0)123 GL.glTranslatef(position.x, position.y, 0) 124 124 GL.glRotate(-rotation, 0, 0, 1) 125 125 GL.glScaled(scale, scale, scale) … … 415 415 #---Functions 416 416 417 def draw_text(self, position = wx. Point(0,0), scale = 1.0, rotation = 0):418 """ 419 position (wx. Point) - x/y Position to draw in scene417 def draw_text(self, position = wx.RealPoint(0.,0.), scale = 1.0, rotation = 0): 418 """ 419 position (wx.RealPoint) - x/y Position to draw in scene 420 420 scale (float) - Scale 421 421 rotation (int) - Rotation in degree
Note: See TracChangeset
for help on using the changeset viewer.