parameters: (self, sizex, sizey)
return_statement: return NodePath(geomnode)
docstring: Access: private.  Each texture card is displayed with
          a two-pixel wide frame (a ring of black and a ring of white).
          This routine builds the frame geometry.  It is necessary to
          be precise so that the frame exactly aligns to pixel
          boundaries, and so that it doesn't overlap the card at all.
docstring_summary: Access: private.  Each texture card is displayed with
          a two-pixel wide frame (a ring of black and a ring of white).
          This routine builds the frame geometry.  It is necessary to
          be precise so that the frame exactly aligns to pixel
          boundaries, and so that it doesn't overlap the card at all.
docstring_tokens: Access : private . Each texture card is displayed with a two - pixel wide frame ( a ring of black and a ring of white ) . This routine builds the frame geometry . It is necessary to be precise so that the frame exactly aligns to pixel boundaries and so that it doesn t overlap the card at all .
function: def makeFrame(self, sizex, sizey):
          """Access: private.  Each texture card is displayed with
          a two-pixel wide frame (a ring of black and a ring of white).
          This routine builds the frame geometry.  It is necessary to
          be precise so that the frame exactly aligns to pixel
          boundaries, and so that it doesn't overlap the card at all."""
  
          format = GeomVertexFormat.getV3c()
          vdata = GeomVertexData('card-frame', format, Geom.UHDynamic)
  
          vwriter = GeomVertexWriter(vdata, 'vertex')
          cwriter = GeomVertexWriter(vdata, 'color')
  
          ringoffset = [0, 1, 1, 2]
          ringbright = [0, 0, 1, 1]
          for ring in range(4):
              offsetx = (ringoffset[ring]*2.0) / float(sizex)
              offsety = (ringoffset[ring]*2.0) / float(sizey)
              bright = ringbright[ring]
              vwriter.addData3f(-1-offsetx, 0, -1-offsety)
              vwriter.addData3f(1+offsetx, 0, -1-offsety)
              vwriter.addData3f(1+offsetx, 0,  1+offsety)
              vwriter.addData3f(-1-offsetx, 0,  1+offsety)
              cwriter.addData3f(bright, bright, bright)
              cwriter.addData3f(bright, bright, bright)
              cwriter.addData3f(bright, bright, bright)
              cwriter.addData3f(bright, bright, bright)
  
          triangles = GeomTriangles(Geom.UHStatic)
          for i in range(2):
              delta = i*8
              triangles.addVertices(0+delta, 4+delta, 1+delta)
              triangles.addVertices(1+delta, 4+delta, 5+delta)
              triangles.addVertices(1+delta, 5+delta, 2+delta)
              triangles.addVertices(2+delta, 5+delta, 6+delta)
              triangles.addVertices(2+delta, 6+delta, 3+delta)
              triangles.addVertices(3+delta, 6+delta, 7+delta)
              triangles.addVertices(3+delta, 7+delta, 0+delta)
              triangles.addVertices(0+delta, 7+delta, 4+delta)
          triangles.closePrimitive()
  
          geom = Geom(vdata)
          geom.addPrimitive(triangles)
          geomnode=GeomNode("card-frame")
          geomnode.addGeom(geom)
          return NodePath(geomnode)
function_tokens: def makeFrame ( self , sizex , sizey ) : format = GeomVertexFormat . getV3c ( ) vdata = GeomVertexData ( 'card-frame' , format , Geom . UHDynamic ) vwriter = GeomVertexWriter ( vdata , 'vertex' ) cwriter = GeomVertexWriter ( vdata , 'color' ) ringoffset = [ 0 , 1 , 1 , 2 ] ringbright = [ 0 , 0 , 1 , 1 ] for ring in range ( 4 ) : offsetx = ( ringoffset [ ring ] * 2.0 ) / float ( sizex ) offsety = ( ringoffset [ ring ] * 2.0 ) / float ( sizey ) bright = ringbright [ ring ] vwriter . addData3f ( - 1 - offsetx , 0 , - 1 - offsety ) vwriter . addData3f ( 1 + offsetx , 0 , - 1 - offsety ) vwriter . addData3f ( 1 + offsetx , 0 , 1 + offsety ) vwriter . addData3f ( - 1 - offsetx , 0 , 1 + offsety ) cwriter . addData3f ( bright , bright , bright ) cwriter . addData3f ( bright , bright , bright ) cwriter . addData3f ( bright , bright , bright ) cwriter . addData3f ( bright , bright , bright ) triangles = GeomTriangles ( Geom . UHStatic ) for i in range ( 2 ) : delta = i * 8 triangles . addVertices ( 0 + delta , 4 + delta , 1 + delta ) triangles . addVertices ( 1 + delta , 4 + delta , 5 + delta ) triangles . addVertices ( 1 + delta , 5 + delta , 2 + delta ) triangles . addVertices ( 2 + delta , 5 + delta , 6 + delta ) triangles . addVertices ( 2 + delta , 6 + delta , 3 + delta ) triangles . addVertices ( 3 + delta , 6 + delta , 7 + delta ) triangles . addVertices ( 3 + delta , 7 + delta , 0 + delta ) triangles . addVertices ( 0 + delta , 7 + delta , 4 + delta ) triangles . closePrimitive ( ) geom = Geom ( vdata ) geom . addPrimitive ( triangles ) geomnode = GeomNode ( "card-frame" ) geomnode . addGeom ( geom ) return NodePath ( geomnode )