Interface JImageFeature

All Superinterfaces:
org.jorigin.state.HandleDisplay, org.jorigin.state.HandleFocus, org.jorigin.state.HandleSelection

public interface JImageFeature extends org.jorigin.state.HandleDisplay, org.jorigin.state.HandleFocus, org.jorigin.state.HandleSelection
An image feature that can be displayed within a JImageCanvas.
Since:
1.0.11
Version:
"1.0.14" - b202111241200L
Author:
Julien SEINTURIER - Université de Toulon / CNRS LIS umr 7020 - github.com/jorigin/jcommon (contact@jorigin.org)
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(double x, double y)
    Check if the point described by the given coordinates (x, y) is inside the feature.
    boolean
    contains(javafx.scene.shape.Shape s)
    Check if the shape given in parameter is inside the feature.
    void
    draw(javafx.scene.canvas.GraphicsContext context, javafx.scene.transform.Affine transform)
    Draw this feature on the given graphic context.
    Get the image feature layer attached to this feature.
    Get the object that is represented by this image feature.
    boolean
    inside(javafx.scene.shape.Shape s)
    Check if the shape given in parameter is inside the feature.
    boolean
    intersects(javafx.scene.shape.Shape s)
    Check if the shape given in parameter is intersecting the feature.
    void
    Set the image feature layer to attach to this feature.
    void
    Set the object that is represented by this image feature.

    Methods inherited from interface org.jorigin.state.HandleDisplay

    isStateDisplayable, isStateDisplaying, setStateDisplayable, setStateDisplaying

    Methods inherited from interface org.jorigin.state.HandleFocus

    isStateFocusable, isStateFocused, setStateFocusable, setStateFocused

    Methods inherited from interface org.jorigin.state.HandleSelection

    isStateSelectable, isStateSelected, setStateSelectable, setStateSelected
  • Method Details

    • draw

      void draw(javafx.scene.canvas.GraphicsContext context, javafx.scene.transform.Affine transform)
      Draw this feature on the given graphic context. The given graphic context is related to the original image space. The transformation applied to the current display is given as transform and can be used to avoid rotation or scale for feature that have constant size or orientation (for example text features).
      Parameters:
      context - a graphic context expressed within image space.
      transform - the transform applied to the view within the JImageCanvas.
    • 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:
      true if the feature is containing the point and false otherwise.
      See Also:
    • contains

      boolean contains(javafx.scene.shape.Shape s)
      Check if the shape given in parameter is inside the feature. The shape have to be expressed within original image space.
      Parameters:
      s - the shape to check.
      Returns:
      true if the feature is containing the shape and false otherwise.
      See Also:
    • intersects

      boolean intersects(javafx.scene.shape.Shape s)
      Check if the shape given in parameter is intersecting the feature. The shape have to be expressed within original image space.
      Parameters:
      s - the shape to check.
      Returns:
      true if the feature is intersecting the shape and false otherwise.
      See Also:
    • inside

      boolean inside(javafx.scene.shape.Shape s)
      Check if the shape given in parameter is inside the feature. The shape have to be expressed within original image space.
      Parameters:
      s - the shape to check.
      Returns:
      true if the feature is inside the shape and false otherwise.
      See Also:
    • getUserData

      Object getUserData()
      Get the object that is represented by this image feature.
      Returns:
      the object that is represented by this image feature
      See Also:
    • setUserData

      void setUserData(Object data)
      Set the object that is represented by this image feature.
      Parameters:
      data - object that is represented by this image feature
    • getImageFeatureLayer

      JImageFeatureLayer getImageFeatureLayer()
      Get the image feature layer attached to this feature.
      Returns:
      the image feature layer attached to this feature
      See Also:
    • setImageFeatureLayer

      void setImageFeatureLayer(JImageFeatureLayer layer)
      Set the image feature layer to attach to this feature.
      Parameters:
      layer - the image feature layer to attach to this feature
      See Also: