fn draw_swiss_cross(group: Group, x: f64, y: f64, size: f64) -> Group {
        let scale_factor = mm(7.0) / 19.0;
        let cross_group = Group::new()
            .add(
            Polygon::new()
                    .set("points", "18.3,0.7 1.6,0.7 0.7,0.7 0.7,1.6 0.7,18.3 0.7,19.1 1.6,19.1 18.3,19.1 19.1,19.1 19.1,18.3 19.1,1.6 19.1,0.7")
                    .set("fill", "black")
            )
            .add(
                Rectangle::new()
                    .set("x", 8.3)
                    .set("y", 4.0)
                    .set("width", 3.3)
                    .set("height", 11.0)
                    .set("fill", "white")
            )
            .add(
                Rectangle::new()
                    .set("x", 4.4)
                    .set("y", 7.9)
                    .set("width", 11.0)
                    .set("height", 3.3)
                    .set("fill", "white")
            )
            .add(
                Polygon::new()
                        .set("points", "0.7,1.6 0.7,18.3 0.7,19.1 1.6,19.1 18.3,19.1 19.1,19.1 19.1,18.3 19.1,1.6 19.1,0.7 18.3,0.7 1.6,0.7 0.7,0.7")
                        .set("fill", "none")
                        .set("stroke", "white")
                        .set("stroke_width", 1.4357)
                )
            .set("transform", format!("translate({}, {}) scale({})", x + size / 2.0 - 10.0 * scale_factor, y + size / 2.0 - 10.0 * scale_factor, scale_factor))
            .set("id", "swiss-cross");

        group.add(cross_group)
    }
/// Draws the swiss cross in the middle of the QR code.
Draws the swiss cross in the middle of the QR code.
Draws the swiss cross in the middle of the QR code .
fn draw_swiss_cross(group: Group, x: f64, y: f64, size: f64) -> Group {
        let scale_factor = mm(7.0) / 19.0;
        let cross_group = Group::new()
            .add(
            Polygon::new()
                    .set("points", "18.3,0.7 1.6,0.7 0.7,0.7 0.7,1.6 0.7,18.3 0.7,19.1 1.6,19.1 18.3,19.1 19.1,19.1 19.1,18.3 19.1,1.6 19.1,0.7")
                    .set("fill", "black")
            )
            .add(
                Rectangle::new()
                    .set("x", 8.3)
                    .set("y", 4.0)
                    .set("width", 3.3)
                    .set("height", 11.0)
                    .set("fill", "white")
            )
            .add(
                Rectangle::new()
                    .set("x", 4.4)
                    .set("y", 7.9)
                    .set("width", 11.0)
                    .set("height", 3.3)
                    .set("fill", "white")
            )
            .add(
                Polygon::new()
                        .set("points", "0.7,1.6 0.7,18.3 0.7,19.1 1.6,19.1 18.3,19.1 19.1,19.1 19.1,18.3 19.1,1.6 19.1,0.7 18.3,0.7 1.6,0.7 0.7,0.7")
                        .set("fill", "none")
                        .set("stroke", "white")
                        .set("stroke_width", 1.4357)
                )
            .set("transform", format!("translate({}, {}) scale({})", x + size / 2.0 - 10.0 * scale_factor, y + size / 2.0 - 10.0 * scale_factor, scale_factor))
            .set("id", "swiss-cross");
        group.add(cross_group)
    }
fn draw_swiss_cross ( group : Group , x : f64 , y : f64 , size : f64 ) -> Group { let scale_factor = mm ( 7.0 ) / 19.0 ; let cross_group = Group :: new ( ) . add ( Polygon :: new ( ) . set ( " " , " " ) . set ( " " , " " ) ) . add ( Rectangle :: new ( ) . set ( " " , 8.3 ) . set ( " " , 4.0 ) . set ( " " , 3.3 ) . set ( " " , 11.0 ) . set ( " " , " " ) ) . add ( Rectangle :: new ( ) . set ( " " , 4.4 ) . set ( " " , 7.9 ) . set ( " " , 11.0 ) . set ( " " , 3.3 ) . set ( " " , " " ) ) . add ( Polygon :: new ( ) . set ( " " , " " ) . set ( " " , " " ) . set ( " " , " " ) . set ( " " , 1.4357 ) ) . set ( " " , format ! ( " " x size 2.0 10.0 scale_factor y size 2.0 10.0 scale_factor scale_factor ) ) . set ( " " , " " ) ; group . add ( cross_group ) }
Draws the swiss cross in the middle of the QR code.
Draws the swiss cross in the middle of the QR code .
group
Group
x
f64
y
f64
size
f64
group
Group
x
f64
y
f64
size
f64