Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ISO53 committed Apr 20, 2024
2 parents ff85624 + 7827fc6 commit 43409bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ InteractiveImagePanel is a Java library that provides an interactive image panel

## Features

- You can now select three different Image-Fit (like CSS Object-Fit) property to scale and relocate the image on component resize. [NEW]
- Zoom in and out with the mouse wheel
- Move the image by clicking and dragging
- Set the zoom level, move the image, and set the image to be displayed
Expand All @@ -20,17 +21,19 @@ Add the following dependency to your `pom.xml`:
<dependency>
<groupId>io.github.iso53</groupId>
<artifactId>interactive-image-panel</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.1</version>
</dependency>
```

## Usage
Here is a basic example of how to use the InteractiveImagePanel:
```java
InteractiveImagePanel interactiveImagePanel = new InteractiveImagePanel();
interactiveImagePanel.setImage(image); // BufferedImage here
interactiveImagePanel.setImage(image);
interactiveImagePanel.setScalingAlgorithm(8);
interactiveImagePanel.addZoomCapability();
interactiveImagePanel.addMoveCapability();
interactiveImagePanel.setImageFit(InteractiveImagePanel.IMAGE_FIT.COVER);
```

## Contributing
Expand Down
5 changes: 3 additions & 2 deletions docs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
var dependency = `<dependency>
<groupId>io.github.iso53</groupId>
<artifactId>interactive-image-panel</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.1</version>
</dependency>`;

var javaCode = `InteractiveImagePanel interactiveImagePanel = new InteractiveImagePanel();
interactiveImagePanel.setImage(image);
interactiveImagePanel.setScalingAlgorithm(8);
interactiveImagePanel.addZoomCapability();
interactiveImagePanel.addMoveCapability();`;
interactiveImagePanel.addMoveCapability();
interactiveImagePanel.setImageFit(InteractiveImagePanel.IMAGE_FIT.COVER);`;

// ************************ JS Starts ************************
topNavbarListener();
Expand Down

0 comments on commit 43409bb

Please sign in to comment.