diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2026-02-10 09:30:42 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2026-02-10 09:30:42 -0500 |
| commit | 3ce04a4d3dc8d174b520d85804e5c8dce8c5d08f (patch) | |
| tree | 8ae271f0f151e1870b25574a88218f2040841247 /layout/layout.go | |
| parent | fa47463d8fa0dbd1b12ef227c15fa573e45244cd (diff) | |
| download | gui-3ce04a4d3dc8d174b520d85804e5c8dce8c5d08f.zip | |
add layout resize functions
Diffstat (limited to 'layout/layout.go')
| -rw-r--r-- | layout/layout.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/layout/layout.go b/layout/layout.go deleted file mode 100644 index b04aa35..0000000 --- a/layout/layout.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -Package layout provides means of partitioning screen space. - -A layout exists in a parent Env, and has one or more child Envs. It -acts as a multiplexer for the children. The parent Env may be a window, -another layout, or whatever... Several layers of layouts can be composed. - -A layout allocates screen area to its children by intercepting Resize -events from the parent Env. Upon reception by the layout, a Resize event -is transformed for each child, and forwarded to them. - -Draw calls from the children are intercepted and translated onto their -respective areas before being forwarded to the parent Env. -*/ -package layout - -import ( - "image" - "image/color" - "image/draw" -) - -func drawBackground(c color.Color) func(draw.Image) image.Rectangle { - return func(img draw.Image) image.Rectangle { - draw.Draw(img, img.Bounds(), &image.Uniform{c}, image.ZP, draw.Src) - return img.Bounds() - } -} |