Api reference added.

This commit is contained in:
Nedyalko Nikolov
2015-04-17 16:00:17 +03:00
parent ab7b526e93
commit 593fdb4826
2 changed files with 20 additions and 6 deletions

View File

@ -80,9 +80,9 @@ var calculateInSampleSize = function (imageWidth, imageHeight, reqWidth, reqHeig
var createDateTimeStamp = function() {
var result = "";
var date = new Date();
result = date.getDate().toString() +
(date.getMonth() + 1).toString() +
var date = new Date(2015, 3, 3);
result = (date.getDate() < 10 ? "0" + date.getDate().toString() : date.getDate().toString())+
((date.getMonth() + 1) < 10 ? "0" + (date.getMonth() + 1).toString() : (date.getMonth() + 1).toString()) +
date.getFullYear().toString() +
date.getHours().toString() +
date.getMinutes().toString() +

20
camera/camera.d.ts vendored
View File

@ -7,15 +7,29 @@ declare module "camera" {
/**
* Take a photo using the camera.
* @param width - Optional parameter which defines the required width of the taken picture.
* @param height - Optional parameter which defines the required height of the taken picture.
* @param keepAspectRatio - Optional parameter which controls if the result picture will keep the aspect ratio of the picture taken by camera.
* @param options - Optional parameter for setting different camera options.
*/
export function takePicture(options?: CameraOptions): Promise<imageSource.ImageSource>;
export interface CameraOptions {
/**
* Defines the desired width (in device independent pixels) of the taken image. It should be used with height property.
* If `keepAspectRatio` actual image width could be different in order to keep the aspect ratio of the original camera image.
* The actual image width will be greater than requested if the display density of the device is higher (than 1) (full HD+ resolutions).
*/
width?: number;
/**
* Defines the desired height (in device independent pixels) of the taken image. It should be used with width property.
* If `keepAspectRatio` actual image width could be different in order to keep the aspect ratio of the original camera image.
* The actual image height will be greater than requested if the display density of the device is higher (than 1) (full HD+ resolutions).
*/
height?: number;
/**
* Defines if camera picture aspect ratio should be kept during picture resizing.
* This property could affect width or heigth return values.
*/
keepAspectRatio?: boolean;
}
}