C# Class CameraImpl.Camera

Inheritance: CameraBase
Mostra file Open project: rhomobile/rhodes

Public Methods

Method 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

Method 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 method

Constructor
public Camera ( ) : System
return System

InitializeCameraProperties() public method

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

RotateStream() public method

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
return System.IO.MemoryStream

SaveToLocalFolderAsync() public method

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
return Task

capture() public method

Not supported in WP8.
public capture ( IMethodResult oResult ) : void
oResult IMethodResult
return void

getAimMode() public method

Not supported in WP8.
public getAimMode ( IMethodResult oResult ) : void
oResult IMethodResult
return void

getCameraType() public method

public getCameraType ( IMethodResult oResult ) : void
oResult IMethodResult
return void

getCaptureSound() public method

Not supported in WP8.
public getCaptureSound ( IMethodResult oResult ) : void
oResult IMethodResult
return void

getColorModel() public method

Not supported in WP8.
public getColorModel ( IMethodResult oResult ) : void
oResult IMethodResult
return void

getCompressionFormat() public method

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

getDesiredHeight() public method

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

getDesiredWidth() public method

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

getEnableEditing() public method

Not supported in WP8.
public getEnableEditing ( IMethodResult oResult ) : void
oResult IMethodResult
return void

getFileName() public method

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

getFlashMode() public method

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

getMaxHeight() public method

Get Maximum Height of the Resolution
public getMaxHeight ( IMethodResult oResult ) : void
oResult IMethodResult
return void

getMaxWidth() public method

Get Maximum Width of the Resolution.
public getMaxWidth ( IMethodResult oResult ) : void
oResult IMethodResult
return void

getOutputFormat() public method

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

getPreviewHeight() public method

Not supported in WP8.
public getPreviewHeight ( IMethodResult oResult ) : void
oResult IMethodResult
return void

getPreviewLeft() public method

Not supported in WP8.
public getPreviewLeft ( IMethodResult oResult ) : void
oResult IMethodResult
return void

getPreviewTop() public method

Not supported in WP8.
public getPreviewTop ( IMethodResult oResult ) : void
oResult IMethodResult
return void

getPreviewWidth() public method

Not supported in WP8.
public getPreviewWidth ( IMethodResult oResult ) : void
oResult IMethodResult
return void

getSaveToDeviceGallery() public method

Not supported in WP8.
public getSaveToDeviceGallery ( IMethodResult oResult ) : void
oResult IMethodResult
return void

getSupportedSizeList() public method

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

getUseRealBitmapResize() public method

Not supported in WP8.
public getUseRealBitmapResize ( IMethodResult oResult ) : void
oResult IMethodResult
return void

getUseSystemViewfinder() public method

Not supported in WP8.
public getUseSystemViewfinder ( IMethodResult oResult ) : void
oResult IMethodResult
return void

hidePreview() public method

Not supported in WP8.
public hidePreview ( IMethodResult oResult ) : void
oResult IMethodResult
return void

setAimMode() public method

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

setCaptureSound() public method

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

setColorModel() public method

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

setCompressionFormat() public method

Not Supported in WP8
public setCompressionFormat ( string compressionFormat, IMethodResult oResult ) : void
compressionFormat string
oResult IMethodResult
return void

setDesiredHeight() public method

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
return void

setDesiredWidth() public method

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
return void

setEnableEditing() public method

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

setFileName() public method

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
return void

setFlashMode() public method

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

setNativeImpl() public method

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

setOutputFormat() public method

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
return void

setPreviewHeight() public method

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

setPreviewLeft() public method

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

setPreviewTop() public method

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

setPreviewWidth() public method

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

setSaveToDeviceGallery() public method

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

setUseRealBitmapResize() public method

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

setUseSystemViewfinder() public method

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

showPreview() public method

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

takePicture() public method

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
return void