size.go 255 B

123456789101112131415161718
  1. package image
  2. type Size struct {
  3. Width uint
  4. Height uint
  5. }
  6. func NewSize(width, height uint) *Size {
  7. return &Size{width, height}
  8. }
  9. func (s *Size) SetWidth(width uint) {
  10. s.Width = width
  11. }
  12. func (s *Size) SetHeight(height uint) {
  13. s.Height = height
  14. }