Package pyjamas :: Package Canvas :: Module RadialGradientImplIE6
[hide private]
[frames] | no frames]

Source Code for Module pyjamas.Canvas.RadialGradientImplIE6

 1  """ 
 2  * Copyright 2008 Google Inc. 
 3  * 
 4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not 
 5  * use this file except in compliance with the License. You may obtain a copy of 
 6  * the License at 
 7  * 
 8  * http:#www.apache.org/licenses/LICENSE-2.0 
 9  * 
10  * Unless required by applicable law or agreed to in writing, software 
11  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 
13  * License for the specific language governing permissions and limitations under 
14  * the License. 
15  """ 
16   
17  from pyjamas.Canvas.CanvasGradientImplIE6 import CanvasGradientImplIE6  
18   
19  """* 
20  *  IE6 deferred binding of Gradient Factory will create instances of this class 
21  *  for RadialGradients. 
22  """ 
23 -class RadialGradientImplIE6 (CanvasGradientImplIE6):
24
25 - def __init__(self, x0, y0, r0, x1, y1, r1):
26 CanvasGradientImplIE6.__init__(self, x0,y0,x1,y1) 27 self.startRad = r0 28 self.endRad = r1 29 self.type = "gradientradial"
30 31
32 - def cloneGradient(self):
33 newGrad = RadialGradientImplIE6(self.startX,self.startY, 34 self.startRad, 35 self.endX,self.endY, 36 self.endRad) 37 newGrad.startX = self.startX 38 newGrad.startY = self.startY 39 newGrad.startRad = self.startRad 40 newGrad.endX = self.endX 41 newGrad.endY = self.endY 42 newGrad.endRad = self.endRad 43 44 cStops = self.colorStops 45 46 for i in range(len(cStops)): 47 newGrad.colorStops.append(cStops[i].cloneColorStop()) 48 49 return newGrad
50