/[gzz]/gzz/gfx/libutil/effects.py
ViewVC logotype

Diff of /gzz/gfx/libutil/effects.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.27 by tjl, Fri Dec 13 12:16:06 2002 UTC revision 1.28 by mudyc, Fri Jan 10 12:38:44 2003 UTC
# Line 34  class IrreguFrame(IrregularFrame): Line 34  class IrreguFrame(IrregularFrame):
34      combiners = "Enable"      combiners = "Enable"
35    
36      def __init__(self, x0, y0, x1, y1, border, ripple,      def __init__(self, x0, y0, x1, y1, border, ripple,
37                      contentColor=java.awt.Color.white,                   typeInt=0,
38                      frameColor=java.awt.Color.black,                   contentColor=java.awt.Color.white,
39                     frameColor=java.awt.Color.black,
40                   type = "square"):                   type = "square"):
41    
42            if typeInt == 1:
43                type = 'square'
44            elif typeInt == 2:
45                type = 'ellipse'
46    
47            
48          print "Texture id:", self.tex.getTexId()          print "Texture id:", self.tex.getTexId()
49    
50          def code(color):          def code(color):
# Line 88  class IrreguFrame(IrregularFrame): Line 96  class IrreguFrame(IrregularFrame):
96    
97          def code2(color):          def code2(color):
98              return parseCombiner("""              return parseCombiner("""
99                  PushAttrib ENABLE_BIT TEXTURE_BIT                  PushAttrib ENABLE_BIT TEXTURE_BIT COLOR_BUFFER_BIT
100                  CombinerParameterNV CONSTANT_COLOR0_NV %(color)s 1                  CombinerParameterNV CONSTANT_COLOR0_NV %(color)s 1
101    
102                  Enable REGISTER_COMBINERS_NV                  Enable REGISTER_COMBINERS_NV
# Line 140  class IrreguFrame(IrregularFrame): Line 148  class IrreguFrame(IrregularFrame):
148              SHIFTS8       = 256;              SHIFTS8       = 256;
149    
150              self._content = GLRen.createIrregularEdge(              self._content = GLRen.createIrregularEdge(
151                  0, texscale, 2.0, 128, 0,                  8, texscale, 2.0, 128, 0,
152                  -.5 * ripple_scale * texscale,                  -1 * ripple_scale * texscale,
153                  .5 * ripple_scale * texscale,                  0 * ripple_scale * texscale,
154                  0, "1 1 1 1 0 0 0 0", "", 3, 0,                  0, "1 1 1 1 0 0 0 0", "", 3, 0,
155                  SLICE_1D + Y_SECCOLOR + INSIDE,                  SLICE_1D + Y_SECCOLOR + INSIDE,
156                  code2(contentColor),                  code2(contentColor),
157                  1.0)                  1.0)
158    
159              self._frame = GLRen.createIrregularEdge(              self._frame = GLRen.createIrregularEdge(
160                  0, texscale, 2.0, 128, 0,                  8, texscale, 2.0, 128, 0,
161                  -.5 * ripple_scale * texscale,                  -1 * ripple_scale * texscale,
162                  .5 * ripple_scale * texscale,                  0 * ripple_scale * texscale,
163                  0, "1 1 1 1 0 0 0 0", "", 3, 0,                  0, "1 1 1 1 0 0 0 0", "", 3, 0,
164                  SLICE_1D + Y_SECCOLOR + DOTVEC_COLOR + INTERP_DOTVEC,                  SLICE_1D + Y_SECCOLOR + DOTVEC_COLOR + INTERP_DOTVEC,
165                  code2(frameColor),                  code2(frameColor),

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26