-
- All Superinterfaces:
HandleDisplay,Named
public interface JImageFeature extends Named, HandleDisplay
An image feature that can be displayed within aJImagePanel.- Since:
- 1.0.4
- Version:
- "1.0.14" - b202111241200L
- Author:
- Julien SEINTURIER - Université de Toulon / CNRS LIS umr 7020 - github.com/jorigin/jcommon (contact@jorigin.org)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontains(double x, double y)Check if the point described by the given coordinates (x,y) is inside the feature.booleancontains(Shape s)Check if theshapegiven in parameter is inside the feature.voiddraw(Graphics2D g2d, AffineTransform transform)Draw this feature on the givengraphic context.booleaninside(Shape s)Check if theshapegiven in parameter is inside the feature.booleanintersects(Shape s)Check if theshapegiven in parameter is intersecting the feature.-
Methods inherited from interface org.jorigin.state.HandleDisplay
isStateDisplayable, isStateDisplaying, setStateDisplayable, setStateDisplaying
-
-
-
-
Method Detail
-
draw
void draw(Graphics2D g2d, AffineTransform transform)
Draw this feature on the givengraphic context. The given graphic context is related to the original image space. The transformation applied to the current display is given astransformand can be used to avoid rotation or scale for feature that have constant size or orientation (for example text features).- Parameters:
g2d- a graphic context expressed within image space.transform- the transform applied to the view within theJImagePanel.
-
contains
boolean contains(double x, double y)Check if the point described by the given coordinates (x,y) is inside the feature. The coordinates have to be expressed within original image space.- Parameters:
x- the x coordinate of the point to check.y- the y coordinate of the point to check.- Returns:
trueif the feature is containing the point andfalseotherwise.- See Also:
contains(Shape),intersects(Shape),inside(Shape)
-
contains
boolean contains(Shape s)
Check if theshapegiven in parameter is inside the feature. The shape have to be expressed within original image space.- Parameters:
s- theshapeto check.- Returns:
trueif the feature is containing the shape andfalseotherwise.- See Also:
contains(double, double),intersects(Shape),inside(Shape)
-
intersects
boolean intersects(Shape s)
Check if theshapegiven in parameter is intersecting the feature. The shape have to be expressed within original image space.- Parameters:
s- theshapeto check.- Returns:
trueif the feature is intersecting the shape andfalseotherwise.- See Also:
contains(double, double),contains(Shape),inside(Shape)
-
inside
boolean inside(Shape s)
Check if theshapegiven in parameter is inside the feature. The shape have to be expressed within original image space.- Parameters:
s- theshapeto check.- Returns:
trueif the feature is inside the shape andfalseotherwise.- See Also:
contains(Shape),contains(double, double),intersects(Shape)
-
-