Offset introduced

This commit is contained in:
Timon Ringwald 2022-05-04 18:06:24 +02:00
parent d2e9a6636f
commit d036639ee6

View File

@ -69,6 +69,12 @@ func (b *Buffer[T]) Height() int {
return b.height
}
// Offset returns the offset of b relative to its parent buffer.
// Offset returns zeros if b has no parent
func (b *Buffer[T]) Offset() (x, y int) {
return b.x, b.y
}
// OffsetX returns the horizontal offset of b relative to its parent buffer.
// OffsetX returns 0 if b has no parent
func (b *Buffer[T]) OffsetX() int {