24 from PyQt4
import QtCore, QtGui
37 self.
root_ = self.handle_.Root()
43 group = self.gradients_.GetGroup(name)
44 gfx_gradient = gfx.Gradient.GradientFromInfo(group)
49 return ImmutableGradientInfoHandler.ConvertToQGradient(gfx_gradient)
55 for group
in group_list:
57 gfx_gradient = gfx.Gradient.GradientFromInfo(group)
58 q_gradients[group.GetAttribute(self.
NAME_ATTRIBUTE_NAME)] = (ImmutableGradientInfoHandler.ConvertToQGradient(gfx_gradient))
64 stops = gfx_gradient.GetStops()
65 qgrad = QtGui.QLinearGradient()
67 color = stop.GetColor()
68 qcolor = QtGui.QColor(color.Red()*255,
72 qgrad.setColorAt(stop.GetRel(), qcolor)
78 for s
in gradient.stops():
81 gfx_gradient.SetColorAt(s[0], gfx.RGB(s[1].redF(), s[1].greenF(), s[1].blueF()));