Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 143388 | Differences between
and this patch

Collapse All | Expand All

(-)src/Svg.py.orig (-5 / +5 lines)
Lines 363-369 Link Here
363
363
364
  def startPath(self, attrs):
364
  def startPath(self, attrs):
365
    if self.context() in ["g", None]:
365
    if self.context() in ["g", None]:
366
      if "d" in attrs:
366
      if attrs.has_key("d"):
367
        self.style().apply(self.drawBoard, self.transform())
367
        self.style().apply(self.drawBoard, self.transform())
368
        self.transform().apply(self.drawBoard)
368
        self.transform().apply(self.drawBoard)
369
        d = str(attrs["d"])
369
        d = str(attrs["d"])
Lines 397-403 Link Here
397
397
398
  def startLineargradient(self, attrs):
398
  def startLineargradient(self, attrs):
399
    if self.context() == "defs":
399
    if self.context() == "defs":
400
      if "xlink:href" in attrs:
400
      if attrs.has_key("xlink:href"):
401
        id = attrs["xlink:href"][1:]
401
        id = attrs["xlink:href"][1:]
402
        if not id in self.defs:
402
        if not id in self.defs:
403
          Log.warn("Linear gradient %s has not been defined." % id)
403
          Log.warn("Linear gradient %s has not been defined." % id)
Lines 412-418 Link Here
412
    
412
    
413
  def startRadialgradient(self, attrs):
413
  def startRadialgradient(self, attrs):
414
    if self.context() == "defs":
414
    if self.context() == "defs":
415
      if "xlink:href" in attrs:
415
      if attrs.has_key("xlink:href"):
416
        id = attrs["xlink:href"][1:]
416
        id = attrs["xlink:href"][1:]
417
        if not id in self.defs:
417
        if not id in self.defs:
418
          Log.warn("Radial gradient %s has not been defined." % id)
418
          Log.warn("Radial gradient %s has not been defined." % id)
Lines 429-441 Link Here
429
    keys = []
429
    keys = []
430
    for stop in self.stops:
430
    for stop in self.stops:
431
      color, opacity, offset = None, None, None
431
      color, opacity, offset = None, None, None
432
      if "style" in stop:
432
      if stop.has_key("style"):
433
        style =  self.style().parseStyle(stop["style"])
433
        style =  self.style().parseStyle(stop["style"])
434
        if "stop-color" in style:
434
        if "stop-color" in style:
435
          color = self.style().parseColor(style["stop-color"])
435
          color = self.style().parseColor(style["stop-color"])
436
        if "stop-opacity" in style:
436
        if "stop-opacity" in style:
437
          opacity = float(style["stop-opacity"])
437
          opacity = float(style["stop-opacity"])
438
      if "offset" in stop:
438
      if stop.has_key("offset"):
439
        offset = float(stop["offset"])
439
        offset = float(stop["offset"])
440
      if offset is not None and (color is not None or opacity is not None):
440
      if offset is not None and (color is not None or opacity is not None):
441
        if opacity is None: opacity = 1.0
441
        if opacity is None: opacity = 1.0

Return to bug 143388