日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

个性二维码开源专题液化/圆角/效果

發(fā)布時間:2025/3/21 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 个性二维码开源专题液化/圆角/效果 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

基礎(chǔ)方法:

ChangeFillShape

//修改填充形狀 ChangeFillShape(...) // 摘要:// 修改填充形狀//// 參數(shù):// g:// 圖形畫板//// Forebrush:// 填充色//// rect:// 區(qū)域//// en_fillshape:// 填充形狀枚舉//// fillshpape:// 填充形狀參數(shù)//// Backbrush:// 背景色//// isOutside:// 是否外修改public Graphics ChangeFillShape(Graphics g, Brush Forebrush, Rectangle rect, EN_FillShape en_fillshape, FillShape fillshpape, Brush Backbrush, bool isOutside = false); View Code //液化方法 InkPaint(...) //// 摘要:// 液化樣式//// 參數(shù):// matrix:// 矩陣//// i:// i//// j:// j//// rect:// 局域//// radius:// 半徑//// isFore:// 填充樣式(true:填充,false:背景)public FillShape InkPaint(bool[][] matrix, int i, int j, Rectangle rect, int radius, bool isFore); View Code //圓角樣式for (int i = 0; i < matrix.Length; i++){for (int j = 0; j < matrix.Length; j++){rect = new Rectangle((j + this.SpacingW) * QrCodeEncoder.QRCodeScale, (i + this.SpacingH) * QrCodeEncoder.QRCodeScale, QrCodeEncoder.QRCodeScale, QrCodeEncoder.QRCodeScale);if (matrix[j][i]){ChangeFillShape(g, new SolidBrush(Color.Blue), rect, EN_FillShape.FillRoundRectangle, new FillShape() { radius = 5, roundStyle = RoundStyle.All }, Backbrush);}else{ChangeFillShape(g, Backbrush, rect, EN_FillShape.FillRectangle, new FillShape(), Backbrush);}}}

//修改radius 值 ChangeFillShape(g, new SolidBrush(Color.Blue), rect, EN_FillShape.FillRoundRectangle, new FillShape() { radius = 50, roundStyle = RoundStyle.All }, Backbrush);

//液化樣式for (int i = 0; i < matrix.Length; i++){for (int j = 0; j < matrix.Length; j++){rect = new Rectangle((j + this.SpacingW) * QrCodeEncoder.QRCodeScale, (i + this.SpacingH) * QrCodeEncoder.QRCodeScale, QrCodeEncoder.QRCodeScale, QrCodeEncoder.QRCodeScale);if (matrix[j][i]){//ChangeFillShape(g, Forebrush, rect, EN_FillShape.FillRectangle, new FillShape(), Forebrush); FillShape _fillShape = new FillShape();_fillShape = InkPaint(matrix, i, j, rect, 100, true);ChangeFillShape(g, Forebrush, rect, EN_FillShape.FillRoundRectangle, _fillShape, Backbrush);}else{ChangeFillShape(g, Backbrush, rect, EN_FillShape.FillRectangle, new FillShape(), Backbrush);//FillShape _fillShape = new FillShape();//_fillShape = InkPaint(matrix, i, j, rect, 100, false);//ChangeFillShape(g, Backbrush, rect, EN_FillShape.FillRoundRectangle, _fillShape, Forebrush);//注意:液化背景色傳入填充色ForeBrush }}}

for (int i = 0; i < matrix.Length; i++){for (int j = 0; j < matrix.Length; j++){rect = new Rectangle((j + this.SpacingW) * QrCodeEncoder.QRCodeScale, (i + this.SpacingH) * QrCodeEncoder.QRCodeScale, QrCodeEncoder.QRCodeScale, QrCodeEncoder.QRCodeScale);if (matrix[j][i]){//ChangeFillShape(g, Forebrush, rect, EN_FillShape.FillRectangle, new FillShape(), Forebrush); FillShape _fillShape = new FillShape();_fillShape = InkPaint(matrix, i, j, rect, 100, true);ChangeFillShape(g, Forebrush, rect, EN_FillShape.FillRoundRectangle, _fillShape, Backbrush);}else{//ChangeFillShape(g, Backbrush, rect, EN_FillShape.FillRectangle, new FillShape(), Backbrush); FillShape _fillShape = new FillShape();_fillShape = InkPaint(matrix, i, j, rect, 100, false);ChangeFillShape(g, Backbrush, rect, EN_FillShape.FillRoundRectangle, _fillShape, Forebrush);//注意:液化背景色傳入填充色ForeBrush }}}

?

個性二維碼開源專題<液化/圓角/效果>,在此介紹完畢了,謝謝大家的觀看與支持。

?

?以下是開源地址,國外github,國內(nèi)oschina.net

oschina.net:

http://git.oschina.net/cheng5x/Yc.QrCode

?

github:

https://github.com/cheng5x/YcQrCode

?

官方網(wǎng)站:
http://original-ad.com

碼曬客討論QQ群:
28629273

轉(zhuǎn)載于:https://www.cnblogs.com/cheng5x/p/3825726.html

總結(jié)

以上是生活随笔為你收集整理的个性二维码开源专题液化/圆角/效果的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。