Basic Methods:
Changefillshape
// Modify the fill shape changefillshape (...)
// Abstract: // modify the fill shape //// parameter: // G: // drawing board //// forebrush: // fill color /// rect: // region //// en_fillshape: // fill shape enumeration // fillshpape: // fill shape parameters //// backbrush: // background color /// isoutside: // whether to modify public graphics changefillshape (Graphics g, brush forebrush, rectangle rect, en_fillshape, fillshape fillshpape, brush backbrush, bool isoutside = false );
View code
// Liquefaction method inkpaint (...)
//// Summary: // liquefaction style //// parameter: // matrix // I: // I /// // //// J: // J //// rect: // local area // radius: // radius // isfore: // fill style (true: Fill, false: background) public fillshape inkpaint (bool [] [] matrix, int I, Int J, rectangle rect, int radius, bool isfore );
View code
// Rounded corner style 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 );}}}
// ModifyRadius value
ChangeFillShape(g, new SolidBrush(Color.Blue), rect, EN_FillShape.FillRoundRectangle, new FillShape() { radius = 50, roundStyle = RoundStyle.All }, Backbrush);
// Liquefaction style 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 ); // Note: The filled color forebrush is passed in as the liquefaction background color }}}
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); // note: filled forebrush with liquefied background color }}}
Personalized QR code Open-Source Topic <liquefaction/rounded corner/Effect>. The introduction is complete. Thank you for your viewing and support.
The following is an open source address, GitHub abroad, and oschina.net in China.
Oschina.net:
Http://git.oschina.net/cheng5x/Yc.QrCode
GitHub:
Https://github.com/cheng5x/YcQrCode
Official Website:
Http://original-ad.com
Q:
28629273