graphcis: Refactoring: (*Image).Size()

This commit is contained in:
Hajime Hoshi 2018-03-10 19:46:46 +09:00
parent 75049c4048
commit df9c67d5db

View File

@ -73,13 +73,7 @@ func (i *Image) copyCheck() {
// Size returns the size of the image.
func (i *Image) Size() (width, height int) {
w := 0
h := 0
if i.restorable != nil {
w, h = i.restorable.Size()
} else if i.sharedImagePart != nil {
_, _, w, h = i.sharedImagePart.region()
}
_, _, w, h := i.region()
return w, h
}