Changeset 4766 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Jan 14, 2021 11:15:32 AM (9 months ago)
Author:
vondreele
Message:

modify atom labeling routine to allow specified offset as wx.RealPoint? - now only used for MapPeaks? plotting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r4765 r4766  
    91539153        GL.glDisable(GL.GL_COLOR_MATERIAL)
    91549154       
    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.)):
    91569156        '''
    91579157        color wx.Colour object
     
    91659165        GL.glRotate(180,1,0,0)             #fix to flip about x-axis
    91669166        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)
    91689168        GL.glEnable(GL.GL_LIGHTING)
    91699169        GL.glPopMatrix()
     
    92509250                        RenderLabel(lx,ly,lz,lbl,radius,wxGreen,matRot)
    92519251                        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))
    92539253        # find bonds
    92549254        bondData = [[] for i in range(len(Atoms))]
Note: See TracChangeset for help on using the changeset viewer.