Examples of WritableImage


Examples of javafx.scene.image.WritableImage

            final SnapshotParameters snapshotParameters = new SnapshotParameters();
            snapshotParameters.setViewport(new Rectangle2D(visualization.getBoundsInParent().getMinX(), visualization.getBoundsInParent().getMinY(),
                                                           visualization.getBoundsInParent().getWidth(),
                                                           contextPane.getLayoutBounds().getHeight() + visualization.getLayoutBounds().getHeight() + partPane.getLayoutBounds().getHeight()
            ));
            WritableImage snapshot = this.snapshot(snapshotParameters, null);
            //pass snapshot to save action
            new SaveSnapshot(controller, snapshot).handle(event);
        });
    }
View Full Code Here

Examples of javafx.scene.image.WritableImage

            Image image = new Image(getResource("default-cover-image.png").openStream());
            Canvas canvas = new Canvas(image.getWidth(), image.getHeight());
            GraphicsContext gc = canvas.getGraphicsContext2D();
            gc.drawImage(image, 0, 0);
            gc.applyEffect(colorAdjust);
            WritableImage colouredImage = new WritableImage((int) image.getWidth(), (int) image.getHeight());
            canvas.snapshot(new SnapshotParameters(), colouredImage);
            coverImageView.setImage(colouredImage);
            // Convert to a PNG and store in the project model.
            ImageIO.setUseCache(false);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

Examples of jxl.write.WritableImage

      try
      {
        sheet.addCell(new Blank(col, row, cellStyle2));
        double leftPos = getColumnRelativePosition(layout, col, leftOffset);
        double topPos = getRowRelativePosition(layout, yCutsRow, topOffset);
        WritableImage image =
          new WritableImage(
            col - emptyCols + leftPos,
            row + topPos,
            getColumnRelativePosition(layout, col, element.getWidth() - rightOffset) - leftPos,
            getRowRelativePosition(layout, yCutsRow, element.getHeight() - bottomOffset) - topPos,
            imageData
View Full Code Here

Examples of jxl.write.WritableImage

    wc = sheet.getWritableCell(1,101).copyTo(1, 102);
    sheet.addCell(wc);

    // Remove the second image from the sheet
    WritableImage wi = sheet.getImage(1);
    sheet.removeImage(wi);

    wi = new WritableImage(1, 116, 2, 9,
                           new File("resources/littlemoretonhall.png"));
    sheet.addImage(wi);

    // Add a list data validations
    label = new Label(0, 151, "Added drop down validation");
View Full Code Here

Examples of jxl.write.WritableImage

  private void writeImageSheet(WritableSheet ws) throws WriteException
  {
    Label l = new Label(0, 0, "Weald & Downland Open Air Museum, Sussex");
    ws.addCell(l);

    WritableImage wi = new WritableImage
      (0, 3, 5, 7, new File("resources/wealdanddownland.png"));
    ws.addImage(wi);

    l = new Label(0, 12, "Merchant Adventurers Hall, York");
    ws.addCell(l);

    wi = new WritableImage(5, 12, 4, 10,
                           new File("resources/merchantadventurers.png"));
    ws.addImage(wi);

    // An unsupported file type
    /*
 
View Full Code Here

Examples of jxl.write.WritableImage

        double useColumnSpan = uiImage.getColumnSpan() == null ? estimatedRowSpan
                : uiImage.getColumnSpan();
        double useRowSpan = uiImage.getRowSpan() == null ? estimatedColSpan
                : uiImage.getRowSpan();

        worksheet.addImage(new WritableImage(useStartColumn, useStartRow,
                useColumnSpan, useRowSpan, pngStream.toByteArray()));
    }
View Full Code Here

Examples of jxl.write.WritableImage

        double useColumnSpan = uiImage.getColumnSpan() == null ? estimatedRowSpan
                : uiImage.getColumnSpan();
        double useRowSpan = uiImage.getRowSpan() == null ? estimatedColSpan
                : uiImage.getRowSpan();

        worksheet.addImage(new WritableImage(useStartColumn, useStartRow,
                useColumnSpan, useRowSpan, pngStream.toByteArray()));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.