Package ro.sync.exml.view.graphics
Interface Shape
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
contains(int x, int y)
Check if the specified coordinates are inside the shape.boolean
contains(int x, int y, int w, int h)
Check if the specified coordinates are inside the shape.Rectangle
getBounds()
Shape
translate(int tx, int ty)
Translate the shape into another one.
-
-
-
Method Detail
-
getBounds
Rectangle getBounds()
- Returns:
- The bounds of this shape.
-
translate
Shape translate(int tx, int ty)
Translate the shape into another one.- Parameters:
tx
- the distance by which coordinates are translated in the X axis directionty
- the distance by which coordinates are translated in the Y axis direction- Returns:
- The newly translated shape
-
contains
boolean contains(int x, int y)
Check if the specified coordinates are inside the shape.- Parameters:
x
- The horizontal coordinate.y
- The vertical coordinate.- Returns:
true
if the point is inside the shape.false
otherwise.
-
contains
boolean contains(int x, int y, int w, int h)
Check if the specified coordinates are inside the shape.- Parameters:
x
- The horizontal coordinate.y
- The vertical coordinate.w
- The width.h
- The height.- Returns:
true
if the point is inside the shape.false
otherwise.
-
-