Screen.java 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Copyright (C) 2016 iZc
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. package de.nplusc.izc.Utilities.WPCMgr;
  18. /**
  19. *
  20. * @author iZc <nplusc.de>
  21. */
  22. public class Screen
  23. {
  24. private final int x,y,w,h;
  25. public Screen(int x,int y,int w,int h)
  26. {
  27. this.x=x;
  28. this.y=y;
  29. this.w=w;
  30. this.h=h;
  31. }
  32. /**
  33. *
  34. * @param other
  35. * @return [rx,ry,w,h]
  36. */
  37. public int[] intersectArea(Screen other)
  38. {
  39. if((this.x+w<=other.x&&this.y+h<=other.y)
  40. ||(other.x+other.w<=w&&other.y+other.h<=h))
  41. {
  42. return new int[]{0,0,0,0};
  43. }
  44. if(this.x<other.x)
  45. {
  46. }
  47. else
  48. {
  49. }
  50. return new int[]{0,0};
  51. }
  52. public int[] intersectArea(int[] basePoint,Screen other)
  53. {
  54. return new int[]{0,0};
  55. }
  56. public int[] getPosition()
  57. {
  58. return null;
  59. }
  60. public int[] getSize()
  61. {
  62. return null;
  63. }
  64. }