◆ Gradient()
◆ create()
bool create |
( |
@NotNilptr double [] |
data | ) |
|
在文件 QBrush.xcsm 第 45 行定义.
45 {
46 if (gradhandle != 0){
47 return false;
48 }
49
50 switch(nstyle){
51 case Style.LinearGradientPattern:
52 gradhandle = QtXnl.createPObject(QType.qtLineGradient, data);
53 break;
54 case Style.RadialGradientPattern:
55 {
56 switch(data.length){
57 case 3:
58 gradhandle = QtXnl.createPObject(QType.qtRadialGradient3, data);
59 break;
60 case 5:
61 gradhandle = QtXnl.createPObject(QType.qtRadialGradient5, data);
62 break;
63 case 6:
64 gradhandle = QtXnl.createPObject(QType.qtRadialGradient6, data);
65 break;
66 }
67 }
68 break;
69 case Style.ConicalGradientPattern:
70 gradhandle = QtXnl.createPObject(QType.qtConicalGradient, data);
71 break;
72 }
74 }
◆ finalize()
在文件 QBrush.xcsm 第 84 行定义.
84 {
85 if (gradhandle != 0){
86 QtXnl.widget_slot(gradhandle, Constant.DELLOCGRADIENT);
87 }
88 }
◆ setColorAt()
void setColorAt |
( |
double |
pos, |
|
|
int |
color |
|
) |
| |
在文件 QBrush.xcsm 第 76 行定义.
76 {
77 QtXnl.widget_set_v2int_double_value(gradhandle, Constant.SETCOLORAT, color, pos, 0);
78 }
◆ setSpread()
void setSpread |
( |
int |
spread | ) |
|
在文件 QBrush.xcsm 第 80 行定义.
80 {
81 QtXnl.widget_set_vint_value(gradhandle, Constant.SETSPREAD, spread);
82 }
◆ gradhandle
◆ nstyle
int nstyle = Style.LinearGradientPattern |
|
package |