透明色及漸變色設定

2021-06-12 01:31:28 字數 869 閱讀 1391

畫窗體背景色

//漸變刷

lineargradientbrush mybrush = new lineargradientbrush(new rectangle(0,0,this.width,this.height), color.fromargb(50, color.blue), color.fromargb(40, color.red), lineargradientmode.backwarddiagonal);

e.graphics.fillrectangle(mybrush,0,0,this.width,this.height);

//(陰影刷)

hatchbrush myhbrush5 = new hatchbrush(hatchstyle.dasheddownwarddiagonal, color.darkorange, color.aquamarine);

//實心刷

solidbrush mybrush = new solidbrush(color.aliceblue);

漸變色color.fromargb(50, color.blue)

繪製矩形框及其透明背景色

//漸變

lineargradientbrush mybrush = new lineargradientbrush(changerect, color.fromargb(50, color.blue), color.fromargb(40, color.red), lineargradientmode.backwarddiagonal);

g.fillrectangle(mybrush, changerect.x + 1, changerect.y + 1, changerect.width - 1, changerect.height - 1);

背景及漸變色

範圍內平鋪 background repeat repeat x 橫行平鋪一行 background repeat repeat y 豎向平鋪一列 background repeat no repeat 無平鋪效果 背景相關的所有屬性都寫在一行 background red url image do...

echarts之漸變色設定

用過echarts的朋友們應該都知道,裡邊的一般都是單色的,但是如果ui把它設計成了漸變色,前端該怎麼處理呢?echarts內建的漸變色生成器echarts.graphic.lineargradient可以用來設定漸變色,那該怎麼寫嗎?下面是乙個線性漸變的柱狀圖的例子 此處只附上series中的 重...

echarts之漸變色設定

在echarts中series屬性中,有乙個itemstyle的屬性是用來設定每一項的樣式的,在itemstyle中的color屬性用於設定顏色,支援單色 線性漸變 徑向漸變和紋理填充等,好像是每個樣式 line bar等 的都有這個屬性,大家可以在官網檢視。還是原來那個圖,改變series中的第乙...