Skip to content

Commit 593fdb4

Browse files
author
Nedyalko Nikolov
committed
Api reference added.
1 parent ab7b526 commit 593fdb4

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

camera/camera.android.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ var calculateInSampleSize = function (imageWidth, imageHeight, reqWidth, reqHeig
8080

8181
var createDateTimeStamp = function() {
8282
var result = "";
83-
var date = new Date();
84-
result = date.getDate().toString() +
85-
(date.getMonth() + 1).toString() +
83+
var date = new Date(2015, 3, 3);
84+
result = (date.getDate() < 10 ? "0" + date.getDate().toString() : date.getDate().toString())+
85+
((date.getMonth() + 1) < 10 ? "0" + (date.getMonth() + 1).toString() : (date.getMonth() + 1).toString()) +
8686
date.getFullYear().toString() +
8787
date.getHours().toString() +
8888
date.getMinutes().toString() +

camera/camera.d.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,29 @@ declare module "camera" {
77

88
/**
99
* Take a photo using the camera.
10-
* @param width - Optional parameter which defines the required width of the taken picture.
11-
* @param height - Optional parameter which defines the required height of the taken picture.
12-
* @param keepAspectRatio - Optional parameter which controls if the result picture will keep the aspect ratio of the picture taken by camera.
10+
* @param options - Optional parameter for setting different camera options.
1311
*/
1412
export function takePicture(options?: CameraOptions): Promise<imageSource.ImageSource>;
1513

1614
export interface CameraOptions {
15+
/**
16+
* Defines the desired width (in device independent pixels) of the taken image. It should be used with height property.
17+
* If `keepAspectRatio` actual image width could be different in order to keep the aspect ratio of the original camera image.
18+
* The actual image width will be greater than requested if the display density of the device is higher (than 1) (full HD+ resolutions).
19+
*/
1720
width?: number;
21+
22+
/**
23+
* Defines the desired height (in device independent pixels) of the taken image. It should be used with width property.
24+
* If `keepAspectRatio` actual image width could be different in order to keep the aspect ratio of the original camera image.
25+
* The actual image height will be greater than requested if the display density of the device is higher (than 1) (full HD+ resolutions).
26+
*/
1827
height?: number;
28+
29+
/**
30+
* Defines if camera picture aspect ratio should be kept during picture resizing.
31+
* This property could affect width or heigth return values.
32+
*/
1933
keepAspectRatio?: boolean;
2034
}
2135
}

0 commit comments

Comments
 (0)