C# Class CameraImpl.Camera

Inheritance: CameraBase
Afficher le fichier Open project: rhomobile/rhodes

Méthodes publiques

Méthode Description
Camera ( ) : System

Constructor

InitializeCameraProperties ( string strId ) : void

Set Basic Camera style like type of camera.

RotateStream ( MemoryStream stream, int angle ) : MemoryStream

For Rotating the captured Image

SaveToLocalFolderAsync ( Stream file, string fileName, IMethodResult StoreTakePictureResult, string>.Dictionary TakePicture_output ) : Task

Stores file in its own virtual drive rho\apps\app

capture ( IMethodResult oResult ) : void

Not supported in WP8.

getAimMode ( IMethodResult oResult ) : void

Not supported in WP8.

getCameraType ( IMethodResult oResult ) : void
getCaptureSound ( IMethodResult oResult ) : void

Not supported in WP8.

getColorModel ( IMethodResult oResult ) : void

Not supported in WP8.

getCompressionFormat ( IMethodResult oResult ) : void

Gets the Compression Format in WP8 we support only Jpeg

getDesiredHeight ( IMethodResult oResult ) : void

Get the setted Resolution Height of the Camera Type (Back/Front).

getDesiredWidth ( IMethodResult oResult ) : void

Get the setted Resolution Width of the Camera Type (Back/Front).

getEnableEditing ( IMethodResult oResult ) : void

Not supported in WP8.

getFileName ( IMethodResult oResult ) : void

Gets the File Name to be used when picture to be saved under CameraRoll.

getFlashMode ( IMethodResult oResult ) : void

Get the kind of flash mode setted (On,Off, Auto)

getMaxHeight ( IMethodResult oResult ) : void

Get Maximum Height of the Resolution

getMaxWidth ( IMethodResult oResult ) : void

Get Maximum Width of the Resolution.

getOutputFormat ( IMethodResult oResult ) : void

get either dataURI(Base64 shall be sent) or image(path of the captured jpeg file).

getPreviewHeight ( IMethodResult oResult ) : void

Not supported in WP8.

getPreviewLeft ( IMethodResult oResult ) : void

Not supported in WP8.

getPreviewTop ( IMethodResult oResult ) : void

Not supported in WP8.

getPreviewWidth ( IMethodResult oResult ) : void

Not supported in WP8.

getSaveToDeviceGallery ( IMethodResult oResult ) : void

Not supported in WP8.

getSupportedSizeList ( IMethodResult oResult ) : void

Get all the Supported Resolution of the specified Camera type.

getUseRealBitmapResize ( IMethodResult oResult ) : void

Not supported in WP8.

getUseSystemViewfinder ( IMethodResult oResult ) : void

Not supported in WP8.

hidePreview ( IMethodResult oResult ) : void

Not supported in WP8.

setAimMode ( string aimMode, IMethodResult oResult ) : void

Not supported in WP8.

setCaptureSound ( string captureSound, IMethodResult oResult ) : void

Not supported in WP8.

setColorModel ( string colorModel, IMethodResult oResult ) : void

Not supported in WP8.

setCompressionFormat ( string compressionFormat, IMethodResult oResult ) : void

Not Supported in WP8

setDesiredHeight ( int desiredHeight, IMethodResult oResult ) : void

Sets the Height from the avaialble Resolution,if not available then sets to the nearest available Resolution.

setDesiredWidth ( int desiredWidth, IMethodResult oResult ) : void

Sets the Width from the avaialble Resolution,if not available then sets to the nearest available Resolution.

setEnableEditing ( bool enableEditing, IMethodResult oResult ) : void

Not supported in WP8.

setFileName ( string fileName, IMethodResult oResult ) : void

Sets the File Name to be used when picture to be saved under CameraRoll.

setFlashMode ( string flashMode, IMethodResult oResult ) : void

Set the kind of flash mode (On,Off,Auto).

setNativeImpl ( string strID, long native ) : void

This is an overloaded method,We set the type of camera type.

setOutputFormat ( string outputFormat, IMethodResult oResult ) : void

get either dataURI or image.

setPreviewHeight ( int previewHeight, IMethodResult oResult ) : void

Not supported in WP8.

setPreviewLeft ( int previewLeft, IMethodResult oResult ) : void

Not supported in WP8.

setPreviewTop ( int previewTop, IMethodResult oResult ) : void

Not supported in WP8.

setPreviewWidth ( int previewWidth, IMethodResult oResult ) : void

Not supported in WP8.

setSaveToDeviceGallery ( bool saveToDeviceGallery, IMethodResult oResult ) : void

Not supported in WP8.

setUseRealBitmapResize ( bool useSystemViewfinder, IMethodResult oResult ) : void

Not supported in WP8.

setUseSystemViewfinder ( bool useSystemViewfinder, IMethodResult oResult ) : void

Not supported in WP8.

showPreview ( string>.IReadOnlyDictionary propertyMap, IMethodResult oResult ) : void

Not supported in WP8.

takePicture ( string>.IReadOnlyDictionary propertyMap, IMethodResult oResult ) : void

To show Still Camera, on taking the picture we shall move to previous screen.

Private Methods

Méthode Description
AddPreviousControls ( ) : void

Add Previous Control as user has finished his action.

CameraButtons_ShutterKeyPressed ( object sender, System e ) : void

On pressing Camera Hardware button

CaptureImage ( ) : void

Capture the Image.

InitializeEventsRelatedtoCamera ( ) : void

Initialize Camera Related Events

Initialize_TakePictureCallBack ( ) : void

Set the default value for the call back parameters

RemovePreviousControls ( ) : void

Remove Previous Controls before adding/Loading Camera Controls

Return_To_Previous_Screen ( ) : void

Return to the previous screen.

Rho_Create_Camera_Layout ( ) : void

Create a camera Layout.

Rho_MainPage_BackKeyPress ( object sender, System e ) : void

on clicking of BackPress on Mobile.

Rho_MainPage_OrientationChanged ( object sender, OrientationChangedEventArgs e ) : void

On changing the screen Orientation.

Rho_PhotoCameraCanvas_Tap ( object sender, System e ) : void

on clicking on Screen.

SetCameraConfiguration ( string>.IReadOnlyDictionary propertyMap ) : void

Set the Configuration as per parameters of camera of take Image

SetCameraRotation ( PageOrientation OrientationStyle ) : void

Initialize/Set the camera as per the Screen Rotation

UninitializeRegisteredEvents ( ) : void

Uninitialize all events which are registered in TakePicture

cam_CaptureImageAvailable ( object sender, Microsoft e ) : void

After clicking image this event is fired.

cam_Initialized ( object sender, Microsoft e ) : void

When camera is up.

rootFrame_Unobscured ( object sender, EventArgs e ) : void

On Unlock of Phone this event is fired.

Method Details

Camera() public méthode

Constructor
public Camera ( ) : System
Résultat System

InitializeCameraProperties() public méthode

Set Basic Camera style like type of camera.
public InitializeCameraProperties ( string strId ) : void
strId string Front or Back camera
Résultat void

RotateStream() public méthode

For Rotating the captured Image
public RotateStream ( MemoryStream stream, int angle ) : MemoryStream
stream System.IO.MemoryStream Input Stream For Rotation
angle int Rotation angle, to which the 'stream' has to be rotated
Résultat System.IO.MemoryStream

SaveToLocalFolderAsync() public méthode

Stores file in its own virtual drive rho\apps\app
public SaveToLocalFolderAsync ( Stream file, string fileName, IMethodResult StoreTakePictureResult, string>.Dictionary TakePicture_output ) : Task
file Stream Stream of file that needs to be saved in the Location.
fileName string Name i n which the file needs to be saved
StoreTakePictureResult IMethodResult
TakePicture_output string>.Dictionary
Résultat Task

capture() public méthode

Not supported in WP8.
public capture ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getAimMode() public méthode

Not supported in WP8.
public getAimMode ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getCameraType() public méthode

public getCameraType ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getCaptureSound() public méthode

Not supported in WP8.
public getCaptureSound ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getColorModel() public méthode

Not supported in WP8.
public getColorModel ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getCompressionFormat() public méthode

Gets the Compression Format in WP8 we support only Jpeg
public getCompressionFormat ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getDesiredHeight() public méthode

Get the setted Resolution Height of the Camera Type (Back/Front).
public getDesiredHeight ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getDesiredWidth() public méthode

Get the setted Resolution Width of the Camera Type (Back/Front).
public getDesiredWidth ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getEnableEditing() public méthode

Not supported in WP8.
public getEnableEditing ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getFileName() public méthode

Gets the File Name to be used when picture to be saved under CameraRoll.
public getFileName ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getFlashMode() public méthode

Get the kind of flash mode setted (On,Off, Auto)
public getFlashMode ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getMaxHeight() public méthode

Get Maximum Height of the Resolution
public getMaxHeight ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getMaxWidth() public méthode

Get Maximum Width of the Resolution.
public getMaxWidth ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getOutputFormat() public méthode

get either dataURI(Base64 shall be sent) or image(path of the captured jpeg file).
public getOutputFormat ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getPreviewHeight() public méthode

Not supported in WP8.
public getPreviewHeight ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getPreviewLeft() public méthode

Not supported in WP8.
public getPreviewLeft ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getPreviewTop() public méthode

Not supported in WP8.
public getPreviewTop ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getPreviewWidth() public méthode

Not supported in WP8.
public getPreviewWidth ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getSaveToDeviceGallery() public méthode

Not supported in WP8.
public getSaveToDeviceGallery ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getSupportedSizeList() public méthode

Get all the Supported Resolution of the specified Camera type.
public getSupportedSizeList ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getUseRealBitmapResize() public méthode

Not supported in WP8.
public getUseRealBitmapResize ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

getUseSystemViewfinder() public méthode

Not supported in WP8.
public getUseSystemViewfinder ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

hidePreview() public méthode

Not supported in WP8.
public hidePreview ( IMethodResult oResult ) : void
oResult IMethodResult
Résultat void

setAimMode() public méthode

Not supported in WP8.
public setAimMode ( string aimMode, IMethodResult oResult ) : void
aimMode string
oResult IMethodResult
Résultat void

setCaptureSound() public méthode

Not supported in WP8.
public setCaptureSound ( string captureSound, IMethodResult oResult ) : void
captureSound string
oResult IMethodResult
Résultat void

setColorModel() public méthode

Not supported in WP8.
public setColorModel ( string colorModel, IMethodResult oResult ) : void
colorModel string
oResult IMethodResult
Résultat void

setCompressionFormat() public méthode

Not Supported in WP8
public setCompressionFormat ( string compressionFormat, IMethodResult oResult ) : void
compressionFormat string
oResult IMethodResult
Résultat void

setDesiredHeight() public méthode

Sets the Height from the avaialble Resolution,if not available then sets to the nearest available Resolution.
public setDesiredHeight ( int desiredHeight, IMethodResult oResult ) : void
desiredHeight int
oResult IMethodResult
Résultat void

setDesiredWidth() public méthode

Sets the Width from the avaialble Resolution,if not available then sets to the nearest available Resolution.
public setDesiredWidth ( int desiredWidth, IMethodResult oResult ) : void
desiredWidth int Width to be setted
oResult IMethodResult
Résultat void

setEnableEditing() public méthode

Not supported in WP8.
public setEnableEditing ( bool enableEditing, IMethodResult oResult ) : void
enableEditing bool
oResult IMethodResult
Résultat void

setFileName() public méthode

Sets the File Name to be used when picture to be saved under CameraRoll.
public setFileName ( string fileName, IMethodResult oResult ) : void
fileName string
oResult IMethodResult
Résultat void

setFlashMode() public méthode

Set the kind of flash mode (On,Off,Auto).
public setFlashMode ( string flashMode, IMethodResult oResult ) : void
flashMode string
oResult IMethodResult
Résultat void

setNativeImpl() public méthode

This is an overloaded method,We set the type of camera type.
public setNativeImpl ( string strID, long native ) : void
strID string
native long
Résultat void

setOutputFormat() public méthode

get either dataURI or image.
public setOutputFormat ( string outputFormat, IMethodResult oResult ) : void
outputFormat string dataURI(Base64 shall be sent) or image(path of the captured jpeg file)
oResult IMethodResult
Résultat void

setPreviewHeight() public méthode

Not supported in WP8.
public setPreviewHeight ( int previewHeight, IMethodResult oResult ) : void
previewHeight int
oResult IMethodResult
Résultat void

setPreviewLeft() public méthode

Not supported in WP8.
public setPreviewLeft ( int previewLeft, IMethodResult oResult ) : void
previewLeft int
oResult IMethodResult
Résultat void

setPreviewTop() public méthode

Not supported in WP8.
public setPreviewTop ( int previewTop, IMethodResult oResult ) : void
previewTop int
oResult IMethodResult
Résultat void

setPreviewWidth() public méthode

Not supported in WP8.
public setPreviewWidth ( int previewWidth, IMethodResult oResult ) : void
previewWidth int
oResult IMethodResult
Résultat void

setSaveToDeviceGallery() public méthode

Not supported in WP8.
public setSaveToDeviceGallery ( bool saveToDeviceGallery, IMethodResult oResult ) : void
saveToDeviceGallery bool
oResult IMethodResult
Résultat void

setUseRealBitmapResize() public méthode

Not supported in WP8.
public setUseRealBitmapResize ( bool useSystemViewfinder, IMethodResult oResult ) : void
useSystemViewfinder bool
oResult IMethodResult
Résultat void

setUseSystemViewfinder() public méthode

Not supported in WP8.
public setUseSystemViewfinder ( bool useSystemViewfinder, IMethodResult oResult ) : void
useSystemViewfinder bool
oResult IMethodResult
Résultat void

showPreview() public méthode

Not supported in WP8.
public showPreview ( string>.IReadOnlyDictionary propertyMap, IMethodResult oResult ) : void
propertyMap string>.IReadOnlyDictionary
oResult IMethodResult
Résultat void

takePicture() public méthode

To show Still Camera, on taking the picture we shall move to previous screen.
public takePicture ( string>.IReadOnlyDictionary propertyMap, IMethodResult oResult ) : void
propertyMap string>.IReadOnlyDictionary Contains the arguments set by user.
oResult IMethodResult
Résultat void