Showing the changes to interface/src/scripting/WindowScriptingInterface.h (1 of 67 files). Show all
Unified · Split
| @@ -305,6 +305,7 @@ public slots: · 304 unmodified lines | |||
| 305 | * {@link Window.stillSnapshotTaken|stillSnapshotTaken} is emitted; when a still image plus moving images are captured, | 305 | * {@link Window.stillSnapshotTaken|stillSnapshotTaken} is emitted; when a still image plus moving images are captured, |
| 306 | * {@link Window.processingGifStarted|processingGifStarted} and {@link Window.processingGifCompleted|processingGifCompleted} | 306 | * {@link Window.processingGifStarted|processingGifStarted} and {@link Window.processingGifCompleted|processingGifCompleted} |
| 307 | * are emitted. The path to store the snapshots and the length of the animated GIF to capture are specified in Settings > | 307 | * are emitted. The path to store the snapshots and the length of the animated GIF to capture are specified in Settings > |
| 308 | * NOTE: to provide a non-default value - all previous parameters must be provided. | ||
| 308 | * General > Snapshots. | 309 | * General > Snapshots. |
| 309 | * @function Window.takeSnapshot | 310 | * @function Window.takeSnapshot |
| 310 | * @param {boolean} notify=true - This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken} | 311 | * @param {boolean} notify=true - This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken} |
| @@ -314,8 +315,10 @@ public slots: · 3 unmodified lines | |||
| 314 | * @param {number} aspectRatio=0 - The width/height ratio of the snapshot required. If the value is <code>0</code> the | 315 | * @param {number} aspectRatio=0 - The width/height ratio of the snapshot required. If the value is <code>0</code> the |
| 315 | * full resolution is used (window dimensions in desktop mode; HMD display dimensions in HMD mode), otherwise one of the | 316 | * full resolution is used (window dimensions in desktop mode; HMD display dimensions in HMD mode), otherwise one of the |
| 316 | * dimensions is adjusted in order to match the aspect ratio. | 317 | * dimensions is adjusted in order to match the aspect ratio. |
| 317 | * @param {string} filename=QString() - If this value is not null then the image will be saved to this filename, with an appended ",jpg". | 318 | * @param {string} filename="" - If this parameter is not given, the image will be saved as 'hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS'. |
| 318 | * otherwise, the image will be saved as 'hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS' | 319 | * If this parameter is <code>""</code> then the image will be saved as ".jpg". |
| 320 | * Otherwise, the image will be saved to this filename, with an appended ".jpg". | ||
| 321 | * | ||
| 319 | * @example <caption>Using the snapshot function and signals.</caption> | 322 | * @example <caption>Using the snapshot function and signals.</caption> |
| 320 | * function onStillSnapshotTaken(path, notify) { | 323 | * function onStillSnapshotTaken(path, notify) { |
| 321 | * print("Still snapshot taken: " + path); | 324 | * print("Still snapshot taken: " + path); |
| @@ -337,15 +340,18 @@ public slots: · 15 unmodified lines | |||
| 337 | * var notify = true; | 340 | * var notify = true; |
| 338 | * var animated = true; | 341 | * var animated = true; |
| 339 | * var aspect = 1920 / 1080; | 342 | * var aspect = 1920 / 1080; |
| 340 | * var filename = QString(); | 343 | * var filename = ""; |
| 341 | * Window.takeSnapshot(notify, animated, aspect, filename); | 344 | * Window.takeSnapshot(notify, animated, aspect, filename); |
| 342 | */ | 345 | */ |
| 343 | void takeSnapshot(bool notify = true, bool includeAnimated = false, float aspectRatio = 0.0f, const QString& filename = QString()); | 346 | void takeSnapshot(bool notify = true, bool includeAnimated = false, float aspectRatio = 0.0f, const QString& filename = QString()); |
| 344 | 347 | ||
| 345 | /**jsdoc | 348 | /**jsdoc |
| 346 | * Takes a still snapshot of the current view from the secondary camera that can be set up through the {@link Render} API. | 349 | * Takes a still snapshot of the current view from the secondary camera that can be set up through the {@link Render} API. |
| 350 | * NOTE: to provide a non-default value - all previous parameters must be provided. | ||
| 347 | * @function Window.takeSecondaryCameraSnapshot | 351 | * @function Window.takeSecondaryCameraSnapshot |
| 348 | * @param {string} filename=QString() - If this value is not null then the image will be saved to this filename, with an appended ".jpg" | 352 | * @param {string} filename="" - If this parameter is not given, the image will be saved as 'hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS'. |
| 353 | * If this parameter is <code>""</code> then the image will be saved as ".jpg". | ||
| 354 | * Otherwise, the image will be saved to this filename, with an appended ".jpg". | ||
| 349 | * | 355 | * |
| 350 | * var filename = QString(); | 356 | * var filename = QString(); |
| 351 | */ | 357 | */ |