Search in sources :

Example 1 with DisplayBorder

use of co.videofirst.vft.capture.model.display.DisplayBorder in project vft-capture by videofirst.

the class DefaultDisplayService method drawBorder.

private void drawBorder(Graphics g) {
    DisplayBorder db = displayUpdate.getBorder();
    DisplayCapture dc = displayUpdate.getCapture();
    if (db != null && db.isDisplay()) {
        g.setColor(db.getColor());
        int pad = db.getPadding();
        for (int i = 0; i < db.getWidth(); i++) {
            // draw rectangle for each pixel of width
            int x = dc.getX() - pad;
            int y = dc.getY() - pad;
            int w = dc.getWidth() - 1 + (pad * 2);
            int h = dc.getHeight() - 1 + (pad * 2);
            g.drawRect(x, y, w, h);
            pad++;
        }
    }
}
Also used : DisplayBorder(co.videofirst.vft.capture.model.display.DisplayBorder) DisplayCapture(co.videofirst.vft.capture.model.display.DisplayCapture)

Aggregations

DisplayBorder (co.videofirst.vft.capture.model.display.DisplayBorder)1 DisplayCapture (co.videofirst.vft.capture.model.display.DisplayCapture)1