mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
Api reference added.
This commit is contained in:
@ -80,9 +80,9 @@ var calculateInSampleSize = function (imageWidth, imageHeight, reqWidth, reqHeig
|
|||||||
|
|
||||||
var createDateTimeStamp = function() {
|
var createDateTimeStamp = function() {
|
||||||
var result = "";
|
var result = "";
|
||||||
var date = new Date();
|
var date = new Date(2015, 3, 3);
|
||||||
result = date.getDate().toString() +
|
result = (date.getDate() < 10 ? "0" + date.getDate().toString() : date.getDate().toString())+
|
||||||
(date.getMonth() + 1).toString() +
|
((date.getMonth() + 1) < 10 ? "0" + (date.getMonth() + 1).toString() : (date.getMonth() + 1).toString()) +
|
||||||
date.getFullYear().toString() +
|
date.getFullYear().toString() +
|
||||||
date.getHours().toString() +
|
date.getHours().toString() +
|
||||||
date.getMinutes().toString() +
|
date.getMinutes().toString() +
|
||||||
|
20
camera/camera.d.ts
vendored
20
camera/camera.d.ts
vendored
@ -7,15 +7,29 @@ declare module "camera" {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Take a photo using the camera.
|
* Take a photo using the camera.
|
||||||
* @param width - Optional parameter which defines the required width of the taken picture.
|
* @param options - Optional parameter for setting different camera options.
|
||||||
* @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.
|
|
||||||
*/
|
*/
|
||||||
export function takePicture(options?: CameraOptions): Promise<imageSource.ImageSource>;
|
export function takePicture(options?: CameraOptions): Promise<imageSource.ImageSource>;
|
||||||
|
|
||||||
export interface CameraOptions {
|
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;
|
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;
|
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;
|
keepAspectRatio?: boolean;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user