RadiusProperty

Description of the View(shape) elliptical corner radius

Create from source

func NewRadiusProperty(params Params) RadiusProperty

Creates the new radius property and return its interface

Create from resource

View {
    radius = _{
        x = 4px,
        y = 4px,
        top-left = 8px,
        bottom-right = 8px,
    }
}

View {
    radius = _{
        top-left = 8px / 8px,
        top-right = 4px / 4px,
        bottom-left = 4px / 4px,
        bottom-right = 8px / 8px,
    }
}

Interface description

Inherit methods from Properties, fmt.Stringer

BoxRadius(session Session) BoxRadius

Return x and y radius of the corners of the element

Properties

"bottom-left"

Determines the bottom-left corner rounding radius of an element's outer border edge

Constant: BottomLeft

Types: SizeUnit, SizeFunc, string, float, int

Internal type is SizeUnit, other types converted to it during assignment

See SizeUnit description for more details

GridLayout {
    width = 100%,
    height = 100%,
    cell-vertical-align = center,
    cell-horizontal-align = center,
    content = [
        EditView {
            radius = _{
                top-left = 0.5em,
                top-right = 0.5em,
                bottom-right = 0.5em,
                bottom-left = 0.5em
            },
            hint = "User name"
        },
    ],
}
view := rui.NewGridLayout(session, rui.Params{
    rui.Width:               rui.Percent(100),
    rui.Height:              rui.Percent(100),
    rui.CellVerticalAlign:   rui.CenterAlign,
    rui.CellHorizontalAlign: rui.CenterAlign,
    rui.Content: rui.NewEditView(session, rui.Params{
        rui.Hint: "User name",
        rui.Radius: rui.NewRadiusProperty(rui.Params{
            rui.TopLeft:     rui.Em(0.5),
            rui.TopRight:    rui.Em(0.5),
            rui.BottomRight: rui.Em(0.5),
            rui.BottomLeft:  rui.Em(0.5),
        }),
    }),
})

"bottom-left-x"

Determines the x-axis bottom-left corner elliptic rounding radius of an element's outer border edge

Constant: BottomLeftX

Types: SizeUnit, SizeFunc, string, float, int

Internal type is SizeUnit, other types converted to it during assignment

See SizeUnit description for more details

GridLayout {
    width = 100%,
    height = 100%,
    cell-vertical-align = center,
    cell-horizontal-align = center,
    content = [
        EditView {
            radius = _{
                top-left-x = 0.5em,
                top-left-y = 0.2em,
                top-right-x = 0.5em,
                top-right-y = 0.2em,
                bottom-right-x = 0.5em,
                bottom-right-y = 0.2em,
                bottom-left-x = 0.5em,
                bottom-left-y = 0.2em,
            },
            hint = "User name",
        },
    ],
}
view := rui.NewGridLayout(session, rui.Params{
    rui.Width:               rui.Percent(100),
    rui.Height:              rui.Percent(100),
    rui.CellVerticalAlign:   rui.CenterAlign,
    rui.CellHorizontalAlign: rui.CenterAlign,
    rui.Content: rui.NewEditView(session, rui.Params{
        rui.Hint: "User name",
        rui.Radius: rui.NewRadiusProperty(rui.Params{
            rui.TopLeftX:     rui.Em(0.5),
            rui.TopLeftY:     rui.Em(0.2),
            rui.TopRightX:    rui.Em(0.5),
            rui.TopRightY:    rui.Em(0.2),
            rui.BottomRightX: rui.Em(0.5),
            rui.BottomRightY: rui.Em(0.2),
            rui.BottomLeftX:  rui.Em(0.5),
            rui.BottomLeftY:  rui.Em(0.2),
        }),
    }),
})

"bottom-left-y"

Determines the y-axis bottom-left corner elliptic rounding radius of an element's outer border edge

Constant: BottomLeftY

Types: SizeUnit, SizeFunc, string, float, int

Internal type is SizeUnit, other types converted to it during assignment

See SizeUnit description for more details

GridLayout {
    width = 100%,
    height = 100%,
    cell-vertical-align = center,
    cell-horizontal-align = center,
    content = [
        EditView {
            radius = _{
                top-left-x = 0.5em,
                top-left-y = 0.2em,
                top-right-x = 0.5em,
                top-right-y = 0.2em,
                bottom-right-x = 0.5em,
                bottom-right-y = 0.2em,
                bottom-left-x = 0.5em,
                bottom-left-y = 0.2em,
            },
            hint = "User name",
        },
    ],
}
view := rui.NewGridLayout(session, rui.Params{
    rui.Width:               rui.Percent(100),
    rui.Height:              rui.Percent(100),
    rui.CellVerticalAlign:   rui.CenterAlign,
    rui.CellHorizontalAlign: rui.CenterAlign,
    rui.Content: rui.NewEditView(session, rui.Params{
        rui.Hint: "User name",
        rui.Radius: rui.NewRadiusProperty(rui.Params{
            rui.TopLeftX:     rui.Em(0.5),
            rui.TopLeftY:     rui.Em(0.2),
            rui.TopRightX:    rui.Em(0.5),
            rui.TopRightY:    rui.Em(0.2),
            rui.BottomRightX: rui.Em(0.5),
            rui.BottomRightY: rui.Em(0.2),
            rui.BottomLeftX:  rui.Em(0.5),
            rui.BottomLeftY:  rui.Em(0.2),
        }),
    }),
})

"bottom-right"

Determines the bottom-right corner rounding radius of an element's outer border edge

Constant: BottomRight

Types: SizeUnit, SizeFunc, string, float, int

Internal type is SizeUnit, other types converted to it during assignment

See SizeUnit description for more details

GridLayout {
    width = 100%,
    height = 100%,
    cell-vertical-align = center,
    cell-horizontal-align = center,
    content = [
        EditView {
            radius = _{
                top-left = 0.5em,
                top-right = 0.5em,
                bottom-right = 0.5em,
                bottom-left = 0.5em
            },
            hint = "User name"
        },
    ],
}
view := rui.NewGridLayout(session, rui.Params{
    rui.Width:               rui.Percent(100),
    rui.Height:              rui.Percent(100),
    rui.CellVerticalAlign:   rui.CenterAlign,
    rui.CellHorizontalAlign: rui.CenterAlign,
    rui.Content: rui.NewEditView(session, rui.Params{
        rui.Hint: "User name",
        rui.Radius: rui.NewRadiusProperty(rui.Params{
            rui.TopLeft:     rui.Em(0.5),
            rui.TopRight:    rui.Em(0.5),
            rui.BottomRight: rui.Em(0.5),
            rui.BottomLeft:  rui.Em(0.5),
        }),
    }),
})

"bottom-right-x"

Determines the x-axis bottom-right corner elliptic rounding radius of an element's outer border edge

Constant: BottomRightX

Types: SizeUnit, SizeFunc, string, float, int

Internal type is SizeUnit, other types converted to it during assignment

See SizeUnit description for more details

GridLayout {
    width = 100%,
    height = 100%,
    cell-vertical-align = center,
    cell-horizontal-align = center,
    content = [
        EditView {
            radius = _{
                top-left-x = 0.5em,
                top-left-y = 0.2em,
                top-right-x = 0.5em,
                top-right-y = 0.2em,
                bottom-right-x = 0.5em,
                bottom-right-y = 0.2em,
                bottom-left-x = 0.5em,
                bottom-left-y = 0.2em,
            },
            hint = "User name",
        },
    ],
}
view := rui.NewGridLayout(session, rui.Params{
    rui.Width:               rui.Percent(100),
    rui.Height:              rui.Percent(100),
    rui.CellVerticalAlign:   rui.CenterAlign,
    rui.CellHorizontalAlign: rui.CenterAlign,
    rui.Content: rui.NewEditView(session, rui.Params{
        rui.Hint: "User name",
        rui.Radius: rui.NewRadiusProperty(rui.Params{
            rui.TopLeftX:     rui.Em(0.5),
            rui.TopLeftY:     rui.Em(0.2),
            rui.TopRightX:    rui.Em(0.5),
            rui.TopRightY:    rui.Em(0.2),
            rui.BottomRightX: rui.Em(0.5),
            rui.BottomRightY: rui.Em(0.2),
            rui.BottomLeftX:  rui.Em(0.5),
            rui.BottomLeftY:  rui.Em(0.2),
        }),
    }),
})

"bottom-right-y"

Determines the y-axis bottom-right corner elliptic rounding radius of an element's outer border edge

Constant: BottomRightY

Types: SizeUnit, SizeFunc, string, float, int

Internal type is SizeUnit, other types converted to it during assignment

See SizeUnit description for more details

GridLayout {
    width = 100%,
    height = 100%,
    cell-vertical-align = center,
    cell-horizontal-align = center,
    content = [
        EditView {
            radius = _{
                top-left-x = 0.5em,
                top-left-y = 0.2em,
                top-right-x = 0.5em,
                top-right-y = 0.2em,
                bottom-right-x = 0.5em,
                bottom-right-y = 0.2em,
                bottom-left-x = 0.5em,
                bottom-left-y = 0.2em,
            },
            hint = "User name",
        },
    ],
}
view := rui.NewGridLayout(session, rui.Params{
    rui.Width:               rui.Percent(100),
    rui.Height:              rui.Percent(100),
    rui.CellVerticalAlign:   rui.CenterAlign,
    rui.CellHorizontalAlign: rui.CenterAlign,
    rui.Content: rui.NewEditView(session, rui.Params{
        rui.Hint: "User name",
        rui.Radius: rui.NewRadiusProperty(rui.Params{
            rui.TopLeftX:     rui.Em(0.5),
            rui.TopLeftY:     rui.Em(0.2),
            rui.TopRightX:    rui.Em(0.5),
            rui.TopRightY:    rui.Em(0.2),
            rui.BottomRightX: rui.Em(0.5),
            rui.BottomRightY: rui.Em(0.2),
            rui.BottomLeftX:  rui.Em(0.5),
            rui.BottomLeftY:  rui.Em(0.2),
        }),
    }),
})

"top-left"

Determines the top-left corner rounding radius of an element's outer border edge

Constant: TopLeft

Types: SizeUnit, SizeFunc, string, float, int

Internal type is SizeUnit, other types converted to it during assignment

See SizeUnit description for more details

GridLayout {
    width = 100%,
    height = 100%,
    cell-vertical-align = center,
    cell-horizontal-align = center,
    content = [
        EditView {
            radius = _{
                top-left = 0.5em,
                top-right = 0.5em,
                bottom-right = 0.5em,
                bottom-left = 0.5em
            },
            hint = "User name"
        },
    ],
}
view := rui.NewGridLayout(session, rui.Params{
    rui.Width:               rui.Percent(100),
    rui.Height:              rui.Percent(100),
    rui.CellVerticalAlign:   rui.CenterAlign,
    rui.CellHorizontalAlign: rui.CenterAlign,
    rui.Content: rui.NewEditView(session, rui.Params{
        rui.Hint: "User name",
        rui.Radius: rui.NewRadiusProperty(rui.Params{
            rui.TopLeft:     rui.Em(0.5),
            rui.TopRight:    rui.Em(0.5),
            rui.BottomRight: rui.Em(0.5),
            rui.BottomLeft:  rui.Em(0.5),
        }),
    }),
})

"top-left-x"

Determines the x-axis top-left corner elliptic rounding radius of an element's outer border edge

Constant: TopLeftX

Types: SizeUnit, SizeFunc, string, float, int

Internal type is SizeUnit, other types converted to it during assignment

See SizeUnit description for more details

GridLayout {
    width = 100%,
    height = 100%,
    cell-vertical-align = center,
    cell-horizontal-align = center,
    content = [
        EditView {
            radius = _{
                top-left-x = 0.5em,
                top-left-y = 0.2em,
                top-right-x = 0.5em,
                top-right-y = 0.2em,
                bottom-right-x = 0.5em,
                bottom-right-y = 0.2em,
                bottom-left-x = 0.5em,
                bottom-left-y = 0.2em,
            },
            hint = "User name",
        },
    ],
}
view := rui.NewGridLayout(session, rui.Params{
    rui.Width:               rui.Percent(100),
    rui.Height:              rui.Percent(100),
    rui.CellVerticalAlign:   rui.CenterAlign,
    rui.CellHorizontalAlign: rui.CenterAlign,
    rui.Content: rui.NewEditView(session, rui.Params{
        rui.Hint: "User name",
        rui.Radius: rui.NewRadiusProperty(rui.Params{
            rui.TopLeftX:     rui.Em(0.5),
            rui.TopLeftY:     rui.Em(0.2),
            rui.TopRightX:    rui.Em(0.5),
            rui.TopRightY:    rui.Em(0.2),
            rui.BottomRightX: rui.Em(0.5),
            rui.BottomRightY: rui.Em(0.2),
            rui.BottomLeftX:  rui.Em(0.5),
            rui.BottomLeftY:  rui.Em(0.2),
        }),
    }),
})

"top-left-y"

Determines the y-axis top-left corner elliptic rounding radius of an element's outer border edge

Constant: TopLeftY

Types: SizeUnit, SizeFunc, string, float, int

Internal type is SizeUnit, other types converted to it during assignment

See SizeUnit description for more details

GridLayout {
    width = 100%,
    height = 100%,
    cell-vertical-align = center,
    cell-horizontal-align = center,
    content = [
        EditView {
            radius = _{
                top-left-x = 0.5em,
                top-left-y = 0.2em,
                top-right-x = 0.5em,
                top-right-y = 0.2em,
                bottom-right-x = 0.5em,
                bottom-right-y = 0.2em,
                bottom-left-x = 0.5em,
                bottom-left-y = 0.2em,
            },
            hint = "User name",
        },
    ],
}
view := rui.NewGridLayout(session, rui.Params{
    rui.Width:               rui.Percent(100),
    rui.Height:              rui.Percent(100),
    rui.CellVerticalAlign:   rui.CenterAlign,
    rui.CellHorizontalAlign: rui.CenterAlign,
    rui.Content: rui.NewEditView(session, rui.Params{
        rui.Hint: "User name",
        rui.Radius: rui.NewRadiusProperty(rui.Params{
            rui.TopLeftX:     rui.Em(0.5),
            rui.TopLeftY:     rui.Em(0.2),
            rui.TopRightX:    rui.Em(0.5),
            rui.TopRightY:    rui.Em(0.2),
            rui.BottomRightX: rui.Em(0.5),
            rui.BottomRightY: rui.Em(0.2),
            rui.BottomLeftX:  rui.Em(0.5),
            rui.BottomLeftY:  rui.Em(0.2),
        }),
    }),
})

"top-right"

Determines the top-right corner rounding radius of an element's outer border edge

Constant: TopRight

Types: SizeUnit, SizeFunc, string, float, int

Internal type is SizeUnit, other types converted to it during assignment

See SizeUnit description for more details

GridLayout {
    width = 100%,
    height = 100%,
    cell-vertical-align = center,
    cell-horizontal-align = center,
    content = [
        EditView {
            radius = _{
                top-left = 0.5em,
                top-right = 0.5em,
                bottom-right = 0.5em,
                bottom-left = 0.5em
            },
            hint = "User name"
        },
    ],
}
view := rui.NewGridLayout(session, rui.Params{
    rui.Width:               rui.Percent(100),
    rui.Height:              rui.Percent(100),
    rui.CellVerticalAlign:   rui.CenterAlign,
    rui.CellHorizontalAlign: rui.CenterAlign,
    rui.Content: rui.NewEditView(session, rui.Params{
        rui.Hint: "User name",
        rui.Radius: rui.NewRadiusProperty(rui.Params{
            rui.TopLeft:     rui.Em(0.5),
            rui.TopRight:    rui.Em(0.5),
            rui.BottomRight: rui.Em(0.5),
            rui.BottomLeft:  rui.Em(0.5),
        }),
    }),
})

"top-right-x"

Determines the x-axis top-right corner elliptic rounding radius of an element's outer border edge

Constant: TopRightX

Types: SizeUnit, SizeFunc, string, float, int

Internal type is SizeUnit, other types converted to it during assignment

See SizeUnit description for more details

GridLayout {
    width = 100%,
    height = 100%,
    cell-vertical-align = center,
    cell-horizontal-align = center,
    content = [
        EditView {
            radius = _{
                top-left-x = 0.5em,
                top-left-y = 0.2em,
                top-right-x = 0.5em,
                top-right-y = 0.2em,
                bottom-right-x = 0.5em,
                bottom-right-y = 0.2em,
                bottom-left-x = 0.5em,
                bottom-left-y = 0.2em,
            },
            hint = "User name",
        },
    ],
}
view := rui.NewGridLayout(session, rui.Params{
    rui.Width:               rui.Percent(100),
    rui.Height:              rui.Percent(100),
    rui.CellVerticalAlign:   rui.CenterAlign,
    rui.CellHorizontalAlign: rui.CenterAlign,
    rui.Content: rui.NewEditView(session, rui.Params{
        rui.Hint: "User name",
        rui.Radius: rui.NewRadiusProperty(rui.Params{
            rui.TopLeftX:     rui.Em(0.5),
            rui.TopLeftY:     rui.Em(0.2),
            rui.TopRightX:    rui.Em(0.5),
            rui.TopRightY:    rui.Em(0.2),
            rui.BottomRightX: rui.Em(0.5),
            rui.BottomRightY: rui.Em(0.2),
            rui.BottomLeftX:  rui.Em(0.5),
            rui.BottomLeftY:  rui.Em(0.2),
        }),
    }),
})

"top-right-y"

Determines the y-axis top-right corner elliptic rounding radius of an element's outer border edge

Constant: TopRightY

Types: SizeUnit, SizeFunc, string, float, int

Internal type is SizeUnit, other types converted to it during assignment

See SizeUnit description for more details

GridLayout {
    width = 100%,
    height = 100%,
    cell-vertical-align = center,
    cell-horizontal-align = center,
    content = [
        EditView {
            radius = _{
                top-left-x = 0.5em,
                top-left-y = 0.2em,
                top-right-x = 0.5em,
                top-right-y = 0.2em,
                bottom-right-x = 0.5em,
                bottom-right-y = 0.2em,
                bottom-left-x = 0.5em,
                bottom-left-y = 0.2em,
            },
            hint = "User name",
        },
    ],
}
view := rui.NewGridLayout(session, rui.Params{
    rui.Width:               rui.Percent(100),
    rui.Height:              rui.Percent(100),
    rui.CellVerticalAlign:   rui.CenterAlign,
    rui.CellHorizontalAlign: rui.CenterAlign,
    rui.Content: rui.NewEditView(session, rui.Params{
        rui.Hint: "User name",
        rui.Radius: rui.NewRadiusProperty(rui.Params{
            rui.TopLeftX:     rui.Em(0.5),
            rui.TopLeftY:     rui.Em(0.2),
            rui.TopRightX:    rui.Em(0.5),
            rui.TopRightY:    rui.Em(0.2),
            rui.BottomRightX: rui.Em(0.5),
            rui.BottomRightY: rui.Em(0.2),
            rui.BottomLeftX:  rui.Em(0.5),
            rui.BottomLeftY:  rui.Em(0.2),
        }),
    }),
})

"x"

Determines the x-axis top-right corner elliptic rounding radius of an element's outer border edge

Constant: X

Types: SizeUnit, SizeFunc, string, float, int

Internal type is SizeUnit, other types converted to it during assignment

See SizeUnit description for more details

GridLayout {
    width = 100%,
    height = 100%,
    cell-vertical-align = center,
    cell-horizontal-align = center,
    content = [
        EditView {
            radius = _{
                x = 0.5em,
                y = 0.5em,
            },
            hint = "User name",
        },
    ],
}
view := rui.NewGridLayout(session, rui.Params{
    rui.Width:               rui.Percent(100),
    rui.Height:              rui.Percent(100),
    rui.CellVerticalAlign:   rui.CenterAlign,
    rui.CellHorizontalAlign: rui.CenterAlign,
    rui.Content: rui.NewEditView(session, rui.Params{
        rui.Hint: "User name",
        rui.Radius: rui.NewRadiusProperty(rui.Params{
            rui.X: rui.Em(0.5),
            rui.Y: rui.Em(0.5),
        }),
    }),
})

"y"

Determines the y-axis top-right corner elliptic rounding radius of an element's outer border edge

Constant: Y

Types: SizeUnit, SizeFunc, string, float, int

Internal type is SizeUnit, other types converted to it during assignment

See SizeUnit description for more details

GridLayout {
    width = 100%,
    height = 100%,
    cell-vertical-align = center,
    cell-horizontal-align = center,
    content = [
        EditView {
            radius = _{
                x = 0.5em,
                y = 0.5em,
            },
            hint = "User name",
        },
    ],
}
view := rui.NewGridLayout(session, rui.Params{
    rui.Width:               rui.Percent(100),
    rui.Height:              rui.Percent(100),
    rui.CellVerticalAlign:   rui.CenterAlign,
    rui.CellHorizontalAlign: rui.CenterAlign,
    rui.Content: rui.NewEditView(session, rui.Params{
        rui.Hint: "User name",
        rui.Radius: rui.NewRadiusProperty(rui.Params{
            rui.X: rui.Em(0.5),
            rui.Y: rui.Em(0.5),
        }),
    }),
})