1 package org.coolreader.crengine; 2 3 public class ImageInfo { 4 int width; 5 int height; 6 int scaledWidth; 7 int scaledHeight; 8 int x; 9 int y; 10 int bufWidth; 11 int bufHeight; 12 int bufDpi; 13 int rotation; 14 ImageInfo()15 public ImageInfo() { 16 17 } 18 ImageInfo(ImageInfo v)19 public ImageInfo(ImageInfo v) { 20 width = v.width; 21 height = v.height; 22 scaledWidth = v.scaledWidth; 23 scaledHeight = v.scaledHeight; 24 x = v.x; 25 y = v.y; 26 bufWidth = v.bufWidth; 27 bufHeight = v.bufHeight; 28 rotation = v.rotation; 29 bufDpi = v.bufDpi; 30 } 31 32 @Override hashCode()33 public int hashCode() { 34 final int prime = 31; 35 int result = 1; 36 result = prime * result + bufHeight; 37 result = prime * result + bufWidth; 38 result = prime * result + height; 39 result = prime * result + scaledHeight; 40 result = prime * result + scaledWidth; 41 result = prime * result + width; 42 result = prime * result + x; 43 result = prime * result + y; 44 result = prime * result + rotation; 45 result = prime * result + bufDpi; 46 return result; 47 } 48 49 @Override equals(Object obj)50 public boolean equals(Object obj) { 51 if (this == obj) 52 return true; 53 if (obj == null) 54 return false; 55 if (getClass() != obj.getClass()) 56 return false; 57 ImageInfo other = (ImageInfo) obj; 58 if (bufHeight != other.bufHeight) 59 return false; 60 if (bufWidth != other.bufWidth) 61 return false; 62 if (height != other.height) 63 return false; 64 if (scaledHeight != other.scaledHeight) 65 return false; 66 if (scaledWidth != other.scaledWidth) 67 return false; 68 if (width != other.width) 69 return false; 70 if (x != other.x) 71 return false; 72 if (y != other.y) 73 return false; 74 if (bufDpi != other.bufDpi) 75 return false; 76 if (rotation != other.rotation) 77 return false; 78 return true; 79 } 80 81 82 } 83