// // Created by Bradley Austin Davis on 2016/01/27 // Copyright 2013-2016 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // #include "RectangleOverlay.h" QString const RectangleOverlay::TYPE = "rectangle"; QUrl const RectangleOverlay::URL(QString("hifi/overlays/RectangleOverlay.qml")); // RectangleOverlay's properties are defined in the QML file specified above. /**jsdoc * These are the properties of a rectangle {@link Overlays.OverlayType|OverlayType}. * @typedef {object} Overlays.RectangleProperties * * @property {Rect} bounds - The position and size of the rectangle, in pixels. Write-only. * @property {number} x - Integer left, x-coordinate value = bounds.x. Write-only. * @property {number} y - Integer top, y-coordinate value = bounds.y. Write-only. * @property {number} width - Integer width of the rectangle = bounds.width. Write-only. * @property {number} height - Integer height of the rectangle = bounds.height. Write-only. * * @property {Color} color=0,0,0 - The color of the overlay. Write-only. * @property {number} alpha=1.0 - The opacity of the overlay, 0.0 - 1.0. Write-only. * @property {number} borderWidth=1 - Integer width of the border, in pixels. The border is drawn within the rectangle's bounds. * It is not drawn unless either borderColor or borderAlpha are specified. Write-only. * @property {number} radius=0 - Integer corner radius, in pixels. Write-only. * @property {Color} borderColor=0,0,0 - The color of the border. Write-only. * @property {number} borderAlpha=1.0 - The opacity of the border, 0.0 - 1.0. * Write-only. * @property {boolean} visible=true - If true, the overlay is rendered, otherwise it is not rendered. * Write-only. */ RectangleOverlay::RectangleOverlay() : QmlOverlay(URL) {} RectangleOverlay::RectangleOverlay(const RectangleOverlay* rectangleOverlay) : QmlOverlay(URL, rectangleOverlay) { } RectangleOverlay* RectangleOverlay::createClone() const { return new RectangleOverlay(this); }