MCPcopy Create free account
hub / github.com/cogentcore/core / TestBorderStyle

Function TestBorderStyle

paint/boxmodel_test.go:85–100  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

83}
84
85func TestBorderStyle(t *testing.T) {
86 for _, typ := range styles.BorderStylesValues() {
87 RunTest(t, filepath.Join("border-styles", strcase.ToKebab(typ.String())), 300, 300, func(pc *Context) {
88 s := styles.NewStyle()
89 s.Background = colors.Uniform(colors.Lightgray)
90 s.Border.Style.Set(typ)
91 s.Border.Width.Set(units.Dp(10))
92 s.Border.Color.Set(colors.Uniform(colors.Blue))
93 s.Border.Radius.Set(units.Dp(50))
94 s.ToDots()
95
96 sz := s.BoxSpace().Size().Add(math32.Vec2(200, 100))
97 pc.DrawStandardBox(s, math32.Vec2(50, 100), sz, colors.Uniform(colors.White))
98 })
99 }
100}

Callers

nothing calls this directly

Calls 14

ToDotsMethod · 0.95
BoxSpaceMethod · 0.95
BorderStylesValuesFunction · 0.92
ToKebabFunction · 0.92
NewStyleFunction · 0.92
UniformFunction · 0.92
DpFunction · 0.92
Vec2Function · 0.92
RunTestFunction · 0.85
DrawStandardBoxMethod · 0.80
StringMethod · 0.65
SetMethod · 0.65

Tested by

no test coverage detected