From 8f47da654c3aaa85ccaa78a9ed04e2fb0a18365f Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Sun, 26 May 2024 00:55:20 -0400 Subject: [PATCH] Update canvas --- canvas/canvas.go | 4 ++-- canvas/texture.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/canvas/canvas.go b/canvas/canvas.go index 838eade..748bfe5 100644 --- a/canvas/canvas.go +++ b/canvas/canvas.go @@ -32,8 +32,8 @@ func (this *Canvas) Pen () canvas.Pen { } } -// Clip returns a sub-canvas of this canvas. -func (this *Canvas) Clip (bounds image.Rectangle) canvas.Canvas { +// SubCanvas returns a subset of this canvas that points to the same data. +func (this *Canvas) SubCanvas (bounds image.Rectangle) canvas.Canvas { this.assert() subImage := this.Image.SubImage(bounds) if subImage == nil { return nil } diff --git a/canvas/texture.go b/canvas/texture.go index da1b900..a15e325 100644 --- a/canvas/texture.go +++ b/canvas/texture.go @@ -86,8 +86,8 @@ func (this *Texture) Close () error { return nil } -// Clip returns a subset of this texture that points to the same data. -func (this *Texture) Clip (bounds image.Rectangle) canvas.Texture { +// SubTexture returns a subset of this texture that points to the same data. +func (this *Texture) SubTexture (bounds image.Rectangle) canvas.Texture { clipped := *this clipped.rect = bounds return &clipped