diff --git a/pom.xml b/pom.xml
index e24bae6..b34f638 100644
--- a/pom.xml
+++ b/pom.xml
@@ -325,7 +325,7 @@
com.unicenta
unicenta-plugins
- 1.2-SNAPSHOT
+ 1.1
com.gluonhq
diff --git a/src/main/java/com/unicenta/pos/forms/StartPOS.java b/src/main/java/com/unicenta/pos/forms/StartPOS.java
index 1606ec9..dce2ea3 100644
--- a/src/main/java/com/unicenta/pos/forms/StartPOS.java
+++ b/src/main/java/com/unicenta/pos/forms/StartPOS.java
@@ -129,7 +129,7 @@ public class StartPOS {
metrics.setUniCentaVersion(AppLocal.APP_VERSION);
Application application = new Application();
application.postMetrics(metrics);
- application.startEventListener(host);
+ //application.startEventListener(host, jRootApp);
} catch (Exception e) {
log.error("Problem with starting the uniCenta plugin application:${}", e.getMessage());
}
diff --git a/src/main/java/com/unicenta/pos/printer/ticket/BasicTicket.java b/src/main/java/com/unicenta/pos/printer/ticket/BasicTicket.java
index aa4ab1b..b5ae61b 100644
--- a/src/main/java/com/unicenta/pos/printer/ticket/BasicTicket.java
+++ b/src/main/java/com/unicenta/pos/printer/ticket/BasicTicket.java
@@ -96,13 +96,36 @@ public abstract class BasicTicket implements PrintItem {
@Override
public void draw(Graphics2D g2d, int x, int y, int width) {
+ BufferedImage image = new BufferedImage(width + 10, 10, 1);
+ g2d = image.createGraphics();
+
int currenty = y;
for (PrintItem pi : m_aCommands) {
pi.draw(g2d, x, currenty, width);
currenty += pi.getHeight();
}
+
+ try {
+ ImageIO.write(this.negative(image), "png", new File(System.getProperty("user.home") + "/test.png"));
+ } catch (Exception var10) {
+ System.out.println("Error serialising receipt image !!! : " + var10);
+ }
+
}
+ public BufferedImage negative(BufferedImage img) {
+ for(int x = 0; x < img.getWidth(); ++x) {
+ for(int y = 0; y < img.getHeight(); ++y) {
+ int RGBA = img.getRGB(x, y);
+ Color col = new Color(RGBA, true);
+ col = new Color(Math.abs(col.getRed() - 255), Math.abs(col.getGreen() - 255), Math.abs(col.getBlue() - 255));
+ img.setRGB(x, y, col.getRGB());
+ }
+ }
+
+ return img;
+ }
+
/**
*
* @return