24 from PyQt5
import QtCore, QtWidgets, QtGui
43 group = self.
gradients_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_NAMENAME_ATTRIBUTE_NAME)] = (ImmutableGradientInfoHandler.ConvertToQGradient(gfx_gradient))
64 stops = gfx_gradient.GetStops()
65 qgrad = QtGui.QLinearGradient()
67 color = stop.GetColor()
68 qcolor = QtGui.QColor(int(color.Red()*255),
69 int(color.Green()*255),
70 int(color.Blue()*255),
71 int(color.Alpha()*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()));
def ConvertToQGradient(gfx_gradient)
def GetGfxGradient(self, name)
def ConvertToGfxGradient(gradient)
def GetQGradient(self, name)
def __init__(self, fileName)