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++;
}
}
}
Aggregations