aboutsummaryrefslogtreecommitdiffstats
path: root/layout/subimage.go
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2026-02-10 09:30:42 -0500
committerSam Anthony <sam@samanthony.xyz>2026-02-10 09:30:42 -0500
commit3ce04a4d3dc8d174b520d85804e5c8dce8c5d08f (patch)
tree8ae271f0f151e1870b25574a88218f2040841247 /layout/subimage.go
parentfa47463d8fa0dbd1b12ef227c15fa573e45244cd (diff)
downloadgui-3ce04a4d3dc8d174b520d85804e5c8dce8c5d08f.zip
add layout resize functions
Diffstat (limited to 'layout/subimage.go')
-rw-r--r--layout/subimage.go17
1 files changed, 0 insertions, 17 deletions
diff --git a/layout/subimage.go b/layout/subimage.go
deleted file mode 100644
index ecbe931..0000000
--- a/layout/subimage.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package layout
-
-import (
- "image"
- "image/draw"
-)
-
-type subimager interface {
- SubImage(image.Rectangle) image.Image
-}
-
-// Subimage returns an image representing the portion of the image m visible through r.
-// The returned value shares pixels with the original.
-// Panics if the concrete image type does not have a SubImage() method.
-func subimage(m draw.Image, r image.Rectangle) draw.Image {
- return m.(subimager).SubImage(r).(draw.Image)
-}